You’ll need to use locals() which is a built-in dictionary of all previously declared variables.
curve1="curve2"
curve2="curve4"
curve3="curve6"
print locals()['curve1'] == "curve2" # Prints True
Though as enrac5 says, you are probably better off using a look-up table (i.e. a dictionary).
curves = {'curve1': 'curve2',
'curve2': 'curve4',
'curve3': 'curve6'}
print curves['curve1'] == 'curve2' # Prints true
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7605cfcc-c471-4657-9e92-a3a0b31686b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sam
Ok guys, thanks alot for your help!!,,Sam
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a9eb3368-e693-40cc-97cd-2c54dea79612%40googlegroups.com.