Re: using variable-value

2005-09-21 Thread bruno modulix
Tor Erik Sønvisen wrote: > Hi > > In php I can assign a value to a variable and use this varaible to access a > property in some object: > > $var = 'property'; > $object->{$var} > > This will transelate to $object->property... > Is this possible in Python? Not directly, but there's a way: geta

using variable-value

2005-09-21 Thread Tor Erik Sønvisen
Hi In php I can assign a value to a variable and use this varaible to access a property in some object: $var = 'property'; $object->{$var} This will transelate to $object->property... Is this possible in Python? # Prints help on methods in Canvas-instance for method in dir(self.canvas): pr