Data store solution need help

H

Haulyn Jason

Hi, all:

I am a Java programmer, now I am working on a Python program. At the
moment, I need to store some data from user's input, no database, no
xml, no txt(we can not make users open the data file by vim or other
text editor).

Any suggestions or reference url? Is there a lib should do this or I
need to implement it myself?

PS: if I want to implement it myself, which part of python document I
need to learn? I know how to write txt files now, but not further for me.

--
Thanks!

VVThumb Microproduction

Location:Room 807,QiLuRuanJianDaSha Qilu Software Park
No. 1 Shunhua Rd High-Tech Development Zone
Jinan, China 250101
Website: http://www.haulynjason.net/haulyn
Mobile: +86 15854103759

Haulyn Jason
 
B

Bruno Desthuilliers

Haulyn Jason a écrit :
Hi, all:

I am a Java programmer, now I am working on a Python program. At the
moment, I need to store some data from user's input, no database, no
xml, no txt(we can not make users open the data file by vim or other
text editor).

Any suggestions or reference url? Is there a lib should do this or I
need to implement it myself?

PS: if I want to implement it myself, which part of python document I
need to learn? I know how to write txt files now, but not further for me.

Not sure I really understand whether you want to store your data in just
any format or if it need to be a "binary" format or else... And you
don't tell much about how your data structure and how it will be used.

Anyway: two possible solutions are csv or serialization.

For the first option, see the csv module
http://docs.python.org/library/csv.html#module-csv

For the second, look at pickle and shelve modules:
http://docs.python.org/library/pickle.html#module-pickle
http://docs.python.org/library/shelve.html#module-shelve


If none of this fits your needs, please provide more details !-)
HTH
 
A

Alex Hall

An important question is: will you need this input stored across
multiple runs of the program? What I mean is, do you want the user to
set the data, then have those same settings even after closing and
re-opening the program?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top