question about loading variables from a file...

Discussion in 'Python' started by avidfan, Nov 5, 2006.

  1. avidfan

    avidfan Guest

    Can someone offer some advice as to how the best way to approach this
    might be?

    I am trying to write a generic python script to build out some
    applications, so the python script will be generic enough to work for
    all of them, but it needs to 'source' a file that contains app and
    environment specific variables.

    I have used WLST, which provides the loadProperties() method for
    reading values for weblogic domains, but I'm trying to find the best
    way to do the same sort of thing in python...

    thanks for any advice.
    avidfan, Nov 5, 2006
    #1
    1. Advertising

  2. avidfan

    Guest

    On Nov 5, 2:26 pm, avidfan <> wrote:
    > Can someone offer some advice as to how the best way to approach this
    > might be?
    >
    > I am trying to write a generic python script to build out some
    > applications, so the python script will be generic enough to work for
    > all of them, but it needs to 'source' a file that contains app and
    > environment specific variables.
    >
    > I have used WLST, which provides the loadProperties() method for
    > reading values for weblogic domains, but I'm trying to find the best
    > way to do the same sort of thing in python...


    Try configparser:
    http://docs.python.org/lib/module-ConfigParser.html
    , Nov 6, 2006
    #2
    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. kwaj
    Replies:
    0
    Views:
    405
  2. David Segall
    Replies:
    2
    Views:
    427
    Thomas Kellerer
    Jan 2, 2007
  3. Replies:
    9
    Views:
    924
  4. Ib Lis
    Replies:
    4
    Views:
    142
    عمر ملقب بالثانی
    Jul 7, 2008
  5. Richard Mccormack

    Loading variables from a file [Noob Question]

    Richard Mccormack, Nov 28, 2010, in forum: Ruby
    Replies:
    5
    Views:
    130
    Josh Cheek
    Nov 29, 2010
Loading...

Share This Page