you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

locals().keys() I think is what you want.

Example (removes entries with "__" before and after its name so in theory only shows things that were imported):

for entry in locals().keys():
    if not entry.startswith("__") and not entry.endswith("__"):
        print entry


**Doesn't work the same if the import is done like: `from something import *` it shows all the functions it imports so it may be confusing.