[Tutor] Problem with data storage
keridee at jayco.net
Fri Dec 3 03:26:15 CET 2004
The way I do it is as follows.
a = open('myfile.txt','r')
di = a.read()
di = eval(di)
a = open('myfile.txt','w')
'''You can put whatever you want in here
di['key'] = 'value'
> I'm building an app that needs to get input from the user and compare
> it to data that should be in some kind of data storage file.
> The problem is that I dont know what data storage file/module to use...
> I need it to be easy for the user to edit by himself (I don't want to
> make an UI to edit the file), organized as list of pairs (or a table)
> and multy platform (if no such thing then WIN only).
> Tutor maillist - Tutor at python.org
More information about the Tutor