473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Preferences Files

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
4 1233
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jonathan | last post by:
Hi, Here's an interesting challenge for anyone who's up to it. :-) When I edit preferences for Netscape or Mozilla, there's an option that says "block unrequested popup windows." Next to this is...
41
by: Mountain Bikn' Guy | last post by:
What is the current preferred way to save user preferences in dotnet? Is the registry the right place to do this? Can anyone recommend a good article (or book) for this topic? Thanks.
13
by: Matt | last post by:
Hello, Im creating a Web Browser in Visual C# and I have a preferences dialog. The current homepage is yahoo.com. The code for the homepage is: // Go Home - go to the default home page....
3
by: clintonG | last post by:
I'm messing around with the Request.UserLanguages and the Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"); to see how similar or dissimilar they may be. I observe and conclude that both get...
0
by: Tom | last post by:
I am planning on adding a Preferences form to my application and using the Property Grid to display the preferences to the user. What do you think would be the best way to save these preferences...
11
by: Tom | last post by:
I am planning on adding a Preferences form to my application and using the Property Grid to display the preferences to the user. What do you think would be the best way to save these preferences...
1
by: Tom | last post by:
I have a large application; lots of forms, multiple dynamic DLLs, etc. I also have, in the appliation, a general 'Preferences' class object (which is in itself a separate DLL, and I just include a...
21
by: Nick Craig-Wood | last post by:
Lance Gamet <lance@gamet.comwrote: I've found http://docs.python.org/lib/module-ConfigParser.html To be easy to use and built in. It makes human readable / editable ..ini - like files. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.