| Reply | « Previous Thread | Next Thread » |
|
hi guys!
i am creating an application for series 60 phone using python. i am new with this and i want to seek some help on how will i create a database for my application. for example, in VB6, i am using MS Access. In python, i have no idea which database will i be using to store the data. |
|
If you store your data to lists or dictionary and use only basic data types, you can get away with simple eval/repr.
lets assume you have following data: Code:
database = {'data': 0}
Code:
open("file", "w").write(repr(database))
Code:
database = eval(open("file").read())
|
| simo.salminen |
| View Public Profile |
| Find all posts by simo.salminen |
|
I wrote a few snippets here. They may be useful to you.
http://www.bigbold.com/snippets/tags/sql/series60 |
|
Simo, there is a convenient way to load/store simple data/structure to a file.
Code:
import marshal
data = {'a':1, 'b':2}
f = open('C:\\file.bin', 'wb')
marshal.dump(data, f)
Code:
f = open('C:\\file.bin', 'rb')
data = marshal.load(f)
However, it's not included in pys60 1.3.1 |
|
Yes, marshal is faster. Nice thing about eval/repr is that you can view and modify the files using text editor, which is nice during development.
|
| simo.salminen |
| View Public Profile |
| Find all posts by simo.salminen |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| database trouble | liafail | General Symbian C++ | 6 | 2005-12-28 06:56 |
| Rdbs (database session or client-server database access) - Feature Not Supported | jjesus | Symbian Tools & SDKs | 3 | 2004-07-27 10:56 |
| InsertL in database Controls the DB | Blkangel | General Symbian C++ | 5 | 2004-01-13 16:02 |
| Series 60 SDK Appwizard on windows xp | moonjoor | Symbian Tools & SDKs | 15 | 2003-12-24 11:22 |
| database problem | sridhar_ratna | General Symbian C++ | 1 | 2003-04-18 10:07 |