By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,222 Members | 2,478 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,222 IT Pros & Developers. It's quick & easy.

Preferences Files

P: n/a
Is there a good preferences modules for Python? I know that the Mac
version has one, but I need something cross-platform.

I just started my first Python project, and I'm used to Java. The
java.util.logging package of the JDK is an amazing resource, and I was
pretty surprised when the Python documentation didn't mention any similar
module for Python. Given that Python API has almost EVERYTHING that the
Java API does and more, I'm sure there must be something like the Java
logging module.

--
Mark Fairchild <md******@sfu.ca>
Learn Lisp today! Uncle Turing wants you!

Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Mark Fairchild a écrit :
Is there a good preferences modules for Python? I know that the Mac
version has one, but I need something cross-platform.

I just started my first Python project, and I'm used to Java. The
java.util.logging package of the JDK is an amazing resource, and I was
pretty surprised when the Python documentation didn't mention any similar
module for Python. Given that Python API has almost EVERYTHING that the
Java API does and more, I'm sure there must be something like the Java
logging module.


Yes, it has one : logging !
http://www.python.org/doc/2.3.3/lib/module-logging.html

And for your preferences module, a simple python file called prefs.py
for example can be enough...

--
Yermat

Jul 18 '05 #2

P: n/a
On Sat, 08 May 2004 11:53:34 GMT,
Mark Fairchild <md******@sfu.ca> wrote:
Is there a good preferences modules for Python? I know that the
Mac version has one, but I need something cross-platform.
There are lots of them. I've had good luck with the standard
ConfigParser module; YMMV.
I just started my first Python project, and I'm used to Java.
The java.util.logging package of the JDK is an amazing resource,
and I was pretty surprised when the Python documentation didn't
mention any similar module for Python. Given that Python API
has almost EVERYTHING that the Java API does and more, I'm sure
there must be something like the Java logging module.
I don't know what the java.util.logging package does, but recent
Pythons come with a Logging module, which has a suspiciously
similar name.
Learn Lisp today! Uncle Turing wants you!


I learned Lisp a while ago; it truly expanded the number of ways I
can think about solving a problem and organizing a program.

See also <http://www.python.org/doc/current/lib/lib.html>.

Regards,
Heather

--
Heather Coppersmith
That's not right; that's not even wrong. -- Wolfgang Pauli
Jul 18 '05 #3

P: n/a
Is there a good preferences modules for Python? I know that the Mac
version has one, but I need something cross-platform.

I'm not a Java person so possibly I'm misunderstanding you. I usually
store preferences as Python and just load them into my program either
with import or exec.

Jul 18 '05 #4

P: n/a
On Sat, 08 May 2004 08:55:54 -0400, Heather Coppersmith wrote:
On Sat, 08 May 2004 11:53:34 GMT,
(SNIP)
See also <http://www.python.org/doc/current/lib/lib.html>.

Regards,
Heather


Thanks -- that's exactly what I was looking for. I knew there had to be
something in the Python API -- it's just too complete to be missing a
preferences system.

--
Mark Fairchild <md******@sfu.ca>
Learn Lisp today! Uncle Turing wants you!
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.