How to eval a file
Gerrit Holl
gerrit at nl.linux.org
Sat Feb 22 15:37:41 EST 2003
Björn Lindberg schreef op zaterdag 22 februari om 17:53:30 +0000:
> I'm writing a program with a "configuration file" if you will, that
> looks something like this:
>
> --------------------------------
> collection = '''Abba %sdabba'''
> topic = '''Gucko %s'''
> --------------------------------
>
> I have trouble getting this information into Python.
You can even copy it into a temporary directory, add the
directory to sys.path and import the file as a module.
yours,
Gerrit.
--
Asperger Syndroom - een persoonlijke benadering:
http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
http://www.sp.nl/
More information about the Python-list
mailing list