![]() |
Request for python advice
I'm completely new to python programing but have a small understanding of visual basic. I'D like to get my feet wet and try my hands at making a python "frontend" to a sqlite database. Specificly a simple logbook app that would record time, date, address, service, odometer mileage. Then hAve the ability to search for when I did a certain job. Later on I'd like to add the ability to get lat/long from my bt gps and record that data as well.
The waY I imagine doing this is making a form, then putting in the code to make it operate. I've seen a few blurbs and comments regarding sqlite and python but no real tutorials. Is there a better way to record my data? 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? What if anythiNg would make my journey easier? Sorry about the ranDOM CApitals, posting from my n800 and they keep popping up. |
Re: Request for python advice
Quote:
I found GTK harder to learn than Python, tbh. I've done GTK development for years using Lazarus, but that abstracts everything so much I never realized how convoluted it seemed compared to my old Windows thought processes. Here's some references I've found useful: Maemo API reference for Python The GTK Class Reference Maemo hardware key map reference Installing ScratchBox on your desktop I hope one or more of those help. Quote:
|
Re: Request for python advice
Oh, by the way, that scratchbox tutorial is for Linux desktops, sorry, no help for you. I'm not even sure there's a way to make an app installer package from inside Windows. In other words, once you have your application working and you want to distribute it, you'll need to build a debian package of it. I don't think you can do that in Windows without a virtual machine.
You could always get VirtualBox and run Ubuntu in a virtual machine on your Windows laptop. Or just bite the bullet and format :D |
Re: Request for python advice
Quote:
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. |
Re: Request for python advice
Quote:
|
Re: Request for python advice
Personnaly i use PyGTKEditor on my n800 :)
|
Re: Request for python advice
I agree that GTK (GUIs in general) is more difficult than Python itself. If you're just getting started, and aiming at something simple, you might look up the Eagle framework at Gustavo Barbieri's blog (see Planet). It is a layer over GTK, done with Maemo and the IT in mind, with a simplified API that lets you define and manage simple forms very easily without needing an IDE.
|
Re: Request for python advice
You don't need to faff around in the sandbox to do python dev, just do it on your favourite linux surface, using glade.
I found the difficult thing was getting my head around the callbacks they are somewhat awkward compared with VB or ( for those who remember ) hypercard, probably far more powerful though. go google for pygtk with glade and have fun I have managed to get gpsd talking to python, will post the basics when I have got a mo btw maemo has python 2.5 |
Re: Request for python advice
Thanks for the advice everyone. I'm about halfway through the Learning Python book. I kNOw that my books are a couple versions behind, but I got them off amazon.com for less than $20 total. I didn't FIgure too much would change. I also downlOaded some online versions as well. Once I get tHe ideas and lingo down I suppose I could invest in the latest versions later and donate the older books to my local library.
|
| All times are GMT. The time now is 09:37. |
vBulletin® Version 3.8.8