[Tutor] importing variables

Stefan Lesicnik stefan at lsd.co.za
Thu Nov 12 15:17:37 CET 2009


Hi guys,

Im trying to do something and hit a bit of a wall, potentially im
going about this the wrong way. Essentially the problem is:

features file contains
rt='''text'''

import features

a = 'rt'
print features.rt  #this works
print features.a  #this fails

I need to use features.a as i am iterating through a list and a would
be the different features i want to check if they exist, and then use
the variable.

I hope that makes sense, or if anyone has any suggestion on how
properly to do this!

Thanks in advance

stefan


More information about the Tutor mailing list