dir() with string as argument
Shankar Iyer (siyer@Princeton.EDU)
siyer at Princeton.EDU
Thu Jun 16 14:59:16 EDT 2005
Hi,
Suppose I have a string, sModuleName, that contains the name of a module. I now want to see what functions are in that module, but if I call dir(sModuleName), I instead get the list of operations that can be done on a string. Is there any way to convert the string into a format that I could feed to dir to cause the desired effect? I think I could modify the string a bit and then use the exec command, but I was advised against that on this board last week.
Shankar
More information about the Python-list
mailing list