Retrieve ext. variables in python program

alfa1234 heliflyer at hotmail.com
Wed Jul 19 17:32:29 EDT 2006


Marc 'BlackJack' Rintsch skrev:

> In <1153338740.544977.90000 at m79g2000cwm.googlegroups.com>, 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.ini')
> > opts = c.parse()
> > print 'Number of retries:',opts.retries
> >
> > Got the following Error when trying to run code:
> > [wsadmin] Traceback (innermost last):
> > [wsadmin]   File "<string>", line 1, in ?
> > [wsadmin] ImportError: no module named cfgparse
>
> Well, the message is quite descriptive.  There is no module named
> `cfgparse`.  Diez suggestet the `ConfigParser` modul.  You notice the
> difference?
>
> Ciao,
> 	Marc 'BlackJack' Rintsch

Hi Marc !!
Did manage to download cfgparse-0.1.tar.gz which include the
"cfgparse.py" module and the program seem to find the module , but when
running above sample I now get the

[wsadmin] ImportError: no module named Configparser

Im not sure about this, but Im running all this using the Websphere 6.0
jython interface(classes = jython.jar)..
Do I need some additional Python implementation in order for the pyton
programs to run properly ??
I really appreciate your help out there guys...




More information about the Python-list mailing list