question about loading variables from a file...

A

avidfan

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

georgeryoung

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
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top