You Are Here:

Community: Developer Discussion Boards

#1 Old Arrow [announce] BT pytools from Kari Pulli - 2006-03-09, 18:02

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
hello ,

Kari Pulli is a Research Fellow at Nokia Research Center (Boston) and has a very interesting page about communication between PC and phone. http://people.csail.mit.edu/kapu/symbian.html and
Look at
http://people.csail.mit.edu/kapu/symbian/python.html You must have http://pyserial.sourceforge.net/ pyserial , http://sourceforge.net/projects/pywin32/ pywin32 for windows only and finally http://people.csail.mit.edu/kapu/symbian/pytools.tgz the updated pytools (updated now on 9 march 2006). pytools mostly concern with Bluetooth (BT) communication between a phone and a PC, as well as shell-types of tools.
Tools contained are :
* sync
Tool for synchronizing files between phone and PC over Bluetooth.
Derived from ideas and code of Jukka Laurila's fileserver and Albert Huang's syncandrun.
* phcomm
Library that simplifies creating client-server applications between a phone and a PC.
Used by sync
* btconsole
Derived from the btconsole that is part of PyS60 distribution.
Includes sync() as a built-in function. If you use pyrepl, you'll also get a primitive
shell with commands such as sync, ls, rm, cd, cat, etc.
* filebrowser
Minor modifications to the filebrowser that comes with PyS60 distribution, slightly
better browsing, can delete files, ...
* glob, fnmatch
Standard Python modules that are not part of PyS60 distribution, with slight modifications
so they work with PyS60.
Glob allows directory listing with wild cards, fnmatch is used by glob. Used by sync, btconsole.
Reply With Quote

#2 Old Re: [announce] BT pytools from Kari Pulli - 2006-03-09, 22:02

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Yes, these are very, very cool indeed! Everyone, go try them! Now!
Reply With Quote

#3 Old Arrow Re: [announce] BT pytools from Kari Pulli - 2006-03-21, 17:25

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Here's new version of pytools now renamed putools
http://people.csail.mit.edu/kapu/symbian/putools.tgz

push
Python Utility Shell. It uses PyShell components from wxWindows to create a nice
front end on the PC side for an interpreter running on the phone, communicating over BT.
Has builtin support for synchronizing files between phone and PC. Soon will get also shell capabilities (ls, cat, rm, ...) like previous version
push is a modification of the great PyShell / PyCrust tools that come with wxPython. It does a lot of processing on the PC side (formatting and color coding input and output, for example, as well as good multiline editing. It echoes the stderr and stdout outputs of the Python interpreter back to PC over Bluetooth

Code:
Mar 16, 2006
    Birth of push[
    changed from using two BT connections and a dummy terminal to a smarter PC gui
    that only uses 1 BT connection both for the interpreter and file synchronization

New putool
=========================================================================================
Old pytool

Mar 9, 2006
    a simpler ascii header for binary data

Mar 8, 2006
    changed the way binary data header (data length, checksum) is sent or received, it must be encoded to ASCII
    syncl reloads the modules in lowercase
    btconsole sets home directory first, always adds HOME/my to sys.path
    syncd creates a directory if needed for files downloaded from the phone
Reply With Quote

#4 Old Re: [announce] BT pytools from Kari Pulli - 2006-03-22, 06:58

Join Date: Jan 2005
Posts: 148
Location: Bangkok, Thailand
Send a message via MSN to korakotc
korakotc's Avatar
korakotc
Offline
Regular Contributor
Really a great app!
It makes coding on pc and transfer to phone much, much easier.
Reply With Quote

#5 Old Re: [announce] BT pytools from Kari Pulli - 2006-03-23, 05:10

Join Date: Jan 2005
Posts: 148
Location: Bangkok, Thailand
Send a message via MSN to korakotc
korakotc's Avatar
korakotc
Offline
Regular Contributor
I found a bug.
When I type just one character then <Enter>, it freezes.
Code:
>>> 1   # freeze
Reply With Quote

#6 Old Re: [announce] BT pytools from Kari Pulli - 2006-03-23, 14:31

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
hello korakot ,

I try that you do and I don't have this problem
Code:
>>>a=2
>>>a
2
>>>1
1
Have you got the last version of wxPython ?
First I try with wxPython 2.6.1 and push shows a error with ShellFrameMixin !
I have installed last version and push now works !
Check wx version
Code:
>>>import wx
>>>wx.VERSION_STRING
'2.6.2.1'
Reply With Quote

#7 Old Re: [announce] BT pytools from Kari Pulli - 2006-03-24, 17:55

Join Date: Jan 2005
Posts: 148
Location: Bangkok, Thailand
Send a message via MSN to korakotc
korakotc's Avatar
korakotc
Offline
Regular Contributor
My wx is from the latest version(2.6.2.1) too.
I don't know what's wrong.

Anyway, I am leaving for a long journey (9 months) without
a proper chance to be online. So, I wouldn't use it much anyway.
Probably a good change to say goodbye to people here.

Bye, Cyke64, Simo and everyone.
Reply With Quote

#8 Old Re: [announce] BT pytools from Kari Pulli - 2006-03-24, 18:13

Join Date: Aug 2004
Posts: 290
simo.salminen
Online
Regular Contributor
Bye korakotc, and have a nice journey.
Reply With Quote

#9 Old Re: [announce] BT pytools from Kari Pulli - 2006-03-24, 18:40

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Push uses the marshal module to encode and decode objects for transmission. The marshal format is not necessarily compatible between releases. The freezing from sending a one-character command is probably because of differing marshal formats of Python 2.2 and 2.4.

Based on a quick test, the marshal format of a one-character string changed between 2.3 and 2.4, so if you have Python 2.2 or 2.3 on your PC, this might work.
Reply With Quote

#10 Old Re: [announce] BT pytools from Kari Pulli - 2006-03-24, 19:02

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
bye Korakot. I'll miss you
You were a good forumer and a great poster (python and pys60 Snippets).
Have a good journey and come back after your journey (next year begin 2007 ???)
Take your Nokia 6600 , a BT keyboard (perhaps an internet link) and make some apps and share with us next year

Bye !
Reply With Quote

#11 Old Re: [announce] BT pytools from Kari Pulli - 2006-03-31, 20:38

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
hello ,

a PUTOOLS new version is available ! now you can use lots of shells commands and help works ! New snap , view , mkdir , rm (multiple arguments) , ls (works now) commands. Large files better supported


http://people.csail.mit.edu/kapu/symbian/python.html

http://people.csail.mit.edu/kapu/symbian/putools.tgz

log file :
May 21, 2006
Now if you call from your program sys.stdout.snap() it'll pop out window on push.
There's also
def show_imgfile( self, filename ):
""" send a jpg or png image stored in a file to PC push which displays it """
def show_img( self, img, title='image' ):
""" send an image to PC push which displays it """
wrap inside try except in case you're not running under push

May 20, 2006
new functions snap and view (man snap, man view) for taking a screen snapshot and viewing
images from the phone, respectively

May 17, 2006
rm command takes now multiple arguments with wild cards
run does not require .py ending (run hello.py and run hello should work the same way)
more printouts during sync when loading files from phone to pc

May 16, 2006
if the application running on the phone did a flush when the outputbuffer was empty, push on the PC side
got out of sync, crashing. fixed.

May 7, 2006
changed the run cmd so that it runs with a relatively clean globals dictionary with __name__ = '__main__'

push is not very responsive while you run a script on the phone. however, now it at least prints the output
out immediately and doesn't buffer them until the command has finished. the output is also sent to the pc
console from which you started push.

May 2, 2006
added mkdir
downloading large files (e.g., MP3 songs) works now better, phpush.py won't run out of memory

Apr 20, 2006
ls works correctly, interpreter starts at Python home

Mar 29, 2006
added lots of shell commands, type man to find out which ones (and then man ls, etc.)
added syncl, sync with load

Mar 26, 2006
startup file actually runs now within the push interpreter
type push_help() to get help on supported commands
Last edited by cyke64 : 2006-05-25 at 07:36. Reason: new version
Reply With Quote

#12 Old Re: [announce] BT pytools from Kari Pulli - 2006-05-28, 13:45

Join Date: May 2006
Posts: 2
malkhalifa
Offline
Registered User
i have tried to install putools but i had some problems in the followin step

Quote:
Start the Python Utility Shell on the PC (still in putools/pcfiles, type python push from the command line)
when i type python push in the putools folder is says

Quote:
G:\Python24\putools>python push
'python' is not recognized as an internal or external command,
operable program or batch file.
i also tried to type it while im in the python24 folder but it says

Quote:
G:\Python24>python push
python: can't open file 'push': [Errno 2] No such file or directory
then i copied the files to the folder python24 and copied the libraries to the folder lib under pthyon 24 and got the following

Quote:
G:\Python24>python push
file G:\Documents and Settings\may\Application Data\push\config
Connecting to serial port COM6
Traceback (most recent call last):
File "push", line 75, in ?
main()
File "push", line 55, in main
app = App(0)
File "G:\Python24\Lib\site-packages\wx-2.6-msw-ansi\wx\_core.py", line 7700, i
n __init__
self._BootstrapApp()
File "G:\Python24\Lib\site-packages\wx-2.6-msw-ansi\wx\_core.py", line 7352, i
n _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "push", line 38, in OnInit
title='push' )
File "G:\Python24\phoneshell.py", line 55, in __init__
execStartupScript=self.execStartupScript,
File "G:\Python24\phoneshell.py", line 242, in __init__
stderr=PseudoFileErr(self.writeErr),
File "G:\Python24\btinterpreter.py", line 52, in __init__
self.bt = BTcomm()
File "G:\Python24\btinterpreter.py", line 25, in __init__
phcomm.SvrCli.__init__( self, sock, verbose )
AttributeError: class SvrCli has no attribute '__init__'
please help me as soon as possible

thank you

may
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ