Saving/retrieving user preferences

B

Brian Wallis

This may be a FAQ,but I cannot find it.

I want to save user preferences, window sizes, recently opened file names,
etc for a python application and I am looking for a package that does this
in a way that is portable across unix/linux and windows (and mac would be
nice as well).

Is there a 'standard' package for doing this in python?

thanks,
 
B

Brian Wallis

(my last post seemed to not get out, sorry if you see it twice)

This may be a FAQ,but I cannot find it.

I want to save user preferences, window sizes, recently opened file names,
etc for a python application and I am looking for a package that does this
in a way that is portable across unix/linux and windows (and mac would be
nice as well).

Is there a 'standard' package for doing this in python?

thanks,
 
M

Miki Tebeka

Hello Brian,
I want to save user preferences, window sizes, recently opened file names,
etc for a python application and I am looking for a package that does this
in a way that is portable across unix/linux and windows (and mac would be
nice as well).

Is there a 'standard' package for doing this in python?
Use internally (almost) any data types you find is best. The save/load is
using pickle.

Bye.
--
------------------------------------------------------------------------
Miki Tebeka <[email protected]>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)

iD8DBQFCqAWp8jAdENsUuJsRAtzSAJ98n2BPj2mT63Y2Wv4bRVAPmcgqHACgqzRQ
6kFDg1NjIa+l4PDAZ26yI90=
=MJOR
-----END PGP SIGNATURE-----
 
B

bruno modulix

Brian said:
This may be a FAQ,but I cannot find it.

I want to save user preferences, window sizes, recently opened file names,
etc for a python application and I am looking for a package that does this
in a way that is portable across unix/linux and windows (and mac would be
nice as well).

Is there a 'standard' package for doing this in python?

http://docs.python.org/lib/module-ConfigParser.html

HTH
 
P

Peter Hansen

Brian said:
This may be a FAQ,but I cannot find it.

I want to save user preferences, window sizes, recently opened file names,
etc for a python application and I am looking for a package that does this
in a way that is portable across unix/linux and windows (and mac would be
nice as well).

Is there a 'standard' package for doing this in python?

As you can see from the replies so far, there is no 'standard', if by
that you mean "one single widely used solution". There are a dozen ways
to do it, with (as far as I can tell) no one standing out in popularity.

That said, I believe the ConfigParser approach is probably one of the
best combinations of simplicity and cleanliness.

-Peter
 
B

Brian Wallis

Brian said:
I want to save user preferences, window sizes, recently opened file names,
etc for a python application and I am looking for a package that does this
in a way that is portable across unix/linux and windows (and mac would be
nice as well).

Thank you all for the replies. I have a few options to try now. I'm using
wxPython so might investigate wxConfigBase for a start.

thansks,
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top