Marc 'BlackJack' Rintsch skrev:
> In <[EMAIL PROTECTED]>, alfa1234 wrote:
>
> > Hi Diez !!
> > Thanks for the reply.. Tried a little well dokumented program:
> >
> > # file: construct.ini
> > retries = 10
> >
> > # file: construct.py
> > import cfgparse
> >
> > c = cfgparse.ConfigParser()
> > c.a
In <[EMAIL PROTECTED]>, alfa1234 wrote:
> Hi Diez !!
> Thanks for the reply.. Tried a little well dokumented program:
>
> # file: construct.ini
> retries = 10
>
> # file: construct.py
> import cfgparse
>
> c = cfgparse.ConfigParser()
> c.add_option('retries', type='int')
> c.add_file('construct.
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 EARPROJEC
Hi Diez !!
Thanks for the reply.. Tried a little well dokumented program:
# file: construct.ini
retries = 10
# file: construct.py
import cfgparse
c = cfgparse.ConfigParser()
c.add_option('retries', type='int')
c.add_file('construct.ini')
opts = c.parse()
print 'Number of retries:',opts.retries
G
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
[EMAIL PROTECTED] skrev:
> alfa1234:
> > Does anyone know and equalent way to confirm a Variable from the same
> > property file using PYTHON code ???
>
> Using globals(), locals(), and dir() you can find if your name exists
> already.
>
> Bye,
> bearophile
Hi bearophile !!
Thanks for the answer
alfa1234:
> Does anyone know and equalent way to confirm a Variable from the same
> property file using PYTHON code ???
Using globals(), locals(), and dir() you can find if your name exists
already.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list