View Single Post
Guest | Posts: n/a | Thanked: 0 times | Joined on
#4
Originally Posted by smileyninja View Post
My question is, with my vb.net mentality- what tools should I gather? I bought a couple of o'reilly books on python (learning 2.3 & programing python2.0), I downloaded pygtk as well as the latest python and sqlite.exe on my WinXP laptop. Assuming the code is as portable as I've heard, I plan on coding on laptop then copying the .py file to n800. Are there any gotchas that I am overlooking?
GUIs are the least portable aspect of Python. The Internet Tablets use an extended version of GTK (and other libraries) called Hildon. The GUI may need some slight adjustments between Hildon and your development platform. On the other hand, the back-end code is very portable between platforms. SQLite comes pre-installed with PyMaemo and Python 2.5 for Windows.

If your data consists less than a couple of thousand of records, using an SQL database such as SQLite may be a bit of an overkill. Even the Internet Tablets are capable of searching through flat text files containing thousands of lines in just a few hundreds of milliseconds. (I quickly tested that a text file with ten thousand 80-character lines with random gibberish took less than one second to read and scan for arbitrary three-character sequences, on a Nokia N800.)

Oh, by the way: Python 2.0 is ancient. You should target Python 2.2 at minimum and get up-to-date documentation. May I suggest the on-line book "Dive Into Python" by Mark Pilgrim? I also have "Python in a Nutshell" by Alex Martelli and "Python Cookbook" by Alex Martelli and David Ascher on my bookshelf and they're both great.