Retrieve ext. variables in python program
Diez B. Roggisch
deets at nospam.web.de
Wed Jul 19 10:20:45 EDT 2006
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
More information about the Python-list
mailing list