How can I get the name of an object???
Alex
cut_me_out at hotmail.com
Fri Apr 28 12:04:16 EDT 2000
> I have an instance of the navigation-class, but for the "exec"code I
> need the name of the *instance*.
If you have some way of referring to the instance in the main body of
the code, why not just give it a name of your own choosing that you can
use in the exec command?
e.g.
instance = get_the_relevant_instance ()
exec ("do_something (%s)" % 'instance')
> >>> from shadow import * #IMPORTANT for me
Just out of curiosity, how come?
Alex.
More information about the Python-list
mailing list