Monday, April 12, 2010

Using PUTools with Python for S60 Ver 2.0.0

Python for S60 developers installing PUTools should follow the original document up to "Getting started with push (Python Utility Shell)"

And before proceeding with "On the phone" section do the following

(i) On phone edit phpush.py as follows

[Original phpush.py - Line 1 to 13]

# phpush.py
#

import appuifw
import phcomm
import os
import sys
import glob
import code
import thread
import pushlib
import graphics
import e32

[Modified phpush.py]

# phpush.py
#
# The memory card of my phone is e: and so have Python & Python/libs
# directories on e: drive. Change the path according to your phone.
import sys
sys.path.append("e://Python//libs")
import appuifw
import phcomm
import os
import glob
import code
import thread
import pushlib
import graphics
import e32

(ii) On phone modify phcomm.py stored under e:/python/libs directory

[Original phcomm.py - Line 32]

import socket

[Modified phcomm.py]

import btsocket as socket