Read .txt file like .py file

King animator333 at
Sun Jul 27 15:14:48 CEST 2008

I have a text file and contents are:

Code is written by xteam.
value = 0.0

How do I read this file like python syntax. What I mean is first
readline operation should return complete declaration of 'Help'
variable. If I evaluate this string then it should create a 'Help'
variable with it's value.

May be something related to 'parsing' would help but I don't know much.

More information about the Python-list mailing list