Preferences Files

M

Mark Fairchild

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.
 
M

Michael

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.
 
Y

Yermat

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...
 
H

Heather Coppersmith

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
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top