call to function by text variable
ianare at gmail.com
Mon Mar 26 00:36:26 CEST 2007
yeah the subject doesn't really make sense does it?
anyway want I want to do is this:
if n == 1:
self.operations.insert(pos, operations.Replace.Panel(self, main))
elif n == 2:
elif n == 3:
self.operations.insert(pos, operations.Move.Panel(self, main))
As you can see all the different functions have the same variables, so
it would be easier if I could just make a list and use that.
list = ["Replace", "ChangeCase", "Move"]
textVariable = list[n]
Is something sort of like that possible?
More information about the Python-list