[Tutor] Problem with data storage
Chad Crabtree
flaxeater at yahoo.com
Wed Dec 1 18:32:15 CET 2004
The Ideal solution for this is csv.
http://www.python.org/doc/2.3.4/lib/module-csv.html
that way it can be edited by any spreadsheet program. and even a
text
editor if the user is careful. Or you can just build the data
structer
yourself.
something like
###file##
key1=value1
key2=value2
###Reader
aDict={}
for line in aFile:
key,value=line.strip().split("=")
aDict[key]=value
HTH
Mark Kels wrote:
>Hello,
>
>
>
>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).
>
>
>
>Thanks!!
>
>_______________________________________________
>
>Tutor maillist - Tutor at python.org
>
>http://mail.python.org/mailman/listinfo/tutor
>
>
>
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
More information about the Tutor
mailing list