Retrieve ext. variables in python program

alfa1234 heliflyer at hotmail.com
Wed Jul 19 15:52:49 EDT 2006


Diez B. Roggisch skrev:

> alfa1234 wrote:
>
> > Trying to convert TCL code to python.
> >
> > Have a property file from where I read some VAR's. Looks like this:
> > EARPROJECT = sgs-procDist
> > APPNAME = SGSProcedure
> >
> >
> > In my TCL code I confirm the existence of the VAR = f.ex EARPROJECT by
> > using code:
> >
> > if { ([info exists APPNAME] && [info exists STAGEDIR] && [info exists
> > EARPROJECT] && [info exists EARDESTINATION]) } {
> >
> >
> > Does anyone know and equalent way to confirm a Variable from the same
> > property file using PYTHON code ???
>
> You can read it with the module ConfigParser
>
> Diez

[wsadmin] Traceback (innermost last):
[wsadmin]   File "<string>", line 1, in ?
[wsadmin] ImportError: no module named cfgparse




More information about the Python-list mailing list