Read .txt file like .py file

King animator333 at gmail.com
Sun Jul 27 09:14:48 EDT 2008


I have a text file and contents are:

Help="""
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