शंतनू's blog

Some Python S60 code snippets...

Get Python S60

How to call?

import telephone
telephone.dial(str(number))

How to hang up?

import telephone
try:
    telephone.hang_up()
except:
    pass

How to give miss call?

import telephone
def my_call_back(param):
    if param[0] == telephone.EStatusConnecting:
        telephone.hang_up()
telephone.call_state(my_call_back)
# my_call_back fuction will be called whenever there is state change
telephone.dial(str(number))

How to use BSNL EVDO on Macbook?

Credits: Thanks V Ganesh for getting EDVO successfully running on Macbook.


$ sudo bash
# cd /System/Library/Extensions/IOSerialFamily.kext/Contents/PlugIns/AppleWWANSupport.kext/Contents

Change Info.plist to add the USB id of your modem, like in the patch.

then

# cd ../../AppleWWANSupport1.kext/Contents

and change Info.plist
there as well, like in the patch.

Your modem USB id may be different, just attach it and see in (top left of menubar) Apple/About this Mac/Hardware/USB.. convert vendor and product id to decimal.

Photo manipulation tips: Imagemagick

Canon A-series cameras produce photos which are of aspect ratio 4:3. To
convert this to 8"x12" @ 300dpi (aspect ratio 3:2, 3600 x 2400),
- create a white jpeg of 3600x2400 in the current directory, called
white.jpg

convert IMG_1234.JPG -resize 3600x2400 -size 3600x2400 xc:white +swap
-gravity center -composite resized/IMG_1234.JPG

.. and save yourself 10 bucks. This will create white bars on the sides

to maintain aspect. If you're smart, you'll change the gravity so that
you get a large white bar on the left. This is useful to punch holes and
file the photos :)

Iterinary for Ladakh Bike Trip

As suggested by Amit and Sharnindar

Please note that i have taken each item mentioned in the list(even the optional ones). That is because I was travelling alone. However, as you guys are in a group, you can share certain spares or other stuff as they may be common across bikes/people. Do not overload the bikes. The idea is to have fun while we are on a mission and not to mess up things. Wish you all a happy and safe riding and enhanced bonding :).

Things to take

Bike Spares
Headlamp/tail lamp bulb
Spark plug
Fuse

Advertisement: Girl Child

Recently, friend send me following ad:

Don't Abort Girl Child

The ad is in english. Majority of India's population does not understand english. I really wonder for whom exactly this ad was created.

Syndicate content