Right now I’m writing Python for Series 60 apps on my Ubuntu laptop and testing with a Nokia N-Gage (the infamous taco). The taco is an excellent (and inexpensive) development/testing platform for Python for Series 60 because it offers a USB connection that once connected allows you full access to the contents of the MMC. After a few rounds of navigating to the right spot on the MMC and then dragging my .py file using Nautilus, I decided to automate the process a bit. Here’s a little bash script (I call it py2phone) that has made my life quite simple:
#!/bin/bash
cp $1 /media/usbdisk/system/apps/python/my
sudo umount /dev/sda1
It copies the first command line argument to the correct spot on the MMC and then handles the umount command so that I can immediately disconnect the USB cable and test on the device. I usually copy to the device after running through it using the PDIS Series 60 compatability library, which helps me find stupid syntax errors before copying to the device. The comatability library sits on top of wxPython and implements most of the basic appuifw functions. I would really like to stub out content_handler to acknowledge the call rather than stacktrace, but other than that the compatability library absolutely rocks for debugging before transfering to the device.
Here’s my development cycle, which when I’m fixing, tweaking or experimenting, can last all of a few seconds:
- Edit
file.py
file (I’m currently using GEdit for syntax highlighting) - run
python file.py
at the command line to run through the app on the laptop ./py2phone file.py
- Unhook USB cable, test app on device
The next step is to automate this process further by extending my little bash to handle the test call, ask if everything went okay, and then conditionally copying the file to the phone and unmounting the device.
Comments
9 responses to “Rapid Python for Series 60 Development”
dont know that much about linux, but do you realy have to unmount usb devices?
i would assume a usb driver would take care of that.
michigan hotels…
manipulating integrated drownings hare:profundity wan?barefooted rascally hotel http://hotel.hotels-activity.com/ …
Not to tell it is more.
http://christcentereddating.com Thanks for that awesome posting. It saved MUCH time 🙂
Continue the good work, wonderful job! This was the info I needed. Can one put some of this on my blog basically incorporate a backlink to this web page?
Hey, I searched for this blog on Bing and just wanted to say thanks for the excellent read. I would have to agree with it, thank you again!
discount tory burch shoes…
Tory Burch Handbags is a trendy yet durable.Tory Burch is an American fashion designer who got her start on the upper-east side of Manhattan. Tory Burch Designer Handbags are a great collection of high quality fun handbags available in a wide variety o…
tory burch shoe sale …
As the summer goes, winter comes.You should have some shoes in store. Based on this point, the Tory Burch sale Shoes is developing faster and faster. More and more people do online shopping.With so many shoes in it, now I advise you getting a pair of T…
Whats up, This blog is very interesting and easy to read. I am a enourmous follower of the things written about. I also gain knowledge by reading the replies, but I notice that a great deal of people should stay on topic to try and add value to the original topic. I would also ask all of you to add this page to your favourite website to help let more people know. Warm Regards