Preferences Files

Discussion in 'Python' started by Mark Fairchild, May 8, 2004.

  1. 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 <>
    Learn Lisp today! Uncle Turing wants you!
     
    Mark Fairchild, May 8, 2004
    #1
    1. Advertising

  2. Mark Fairchild

    Michael Guest


    >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.
     
    Michael, May 8, 2004
    #2
    1. Advertising

  3. Mark Fairchild

    Yermat Guest

    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
     
    Yermat, May 8, 2004
    #3
  4. On Sat, 08 May 2004 11:53:34 GMT,
    Mark Fairchild <> 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
     
    Heather Coppersmith, May 8, 2004
    #4
  5. 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 <>
    Learn Lisp today! Uncle Turing wants you!
     
    Mark Fairchild, May 8, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. clintonG
    Replies:
    3
    Views:
    2,480
    clintonG
    Jul 3, 2004
  2. =?Utf-8?B?R3JlZw==?=

    IE printing preferences

    =?Utf-8?B?R3JlZw==?=, Jan 24, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    549
    Stefano
    Jan 24, 2005
  3. Patrick Olurotimi Ige

    Rating 1 to 3 in order of preferences Question

    Patrick Olurotimi Ige, Feb 24, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    304
    Patrick Olurotimi Ige
    Feb 24, 2005
  4. Oliver Hirschi

    java.util.prefs.Preferences

    Oliver Hirschi, Jul 16, 2003, in forum: Java
    Replies:
    8
    Views:
    8,774
    Chris Riesbeck
    Jul 16, 2003
  5. Replies:
    3
    Views:
    337
    Roedy Green
    Aug 22, 2007
Loading...

Share This Page