What I\'m trying to do would look like this in the command line:
>>> import mymodule >>> names = dir(mymodule)
How can I
As previously mentioned, globals gives you a dictionary as opposed to dir() which gives you a list of the names defined in the module. The way I typically see this done is like this:
import sys dir(sys.modules[__name__])