T
Thomas Aanensen
How can I get the names of the classes in a specific module? (I don't need
the subclasses or superclasses)
Thomas
the subclasses or superclasses)
Thomas
Thomas said:How can I get the names of the classes in a specific module? (I don't need
the subclasses or superclasses)pyclbr.readmodule("csv").keys() ['Dialect', 'DictReader', 'excel', 'excel_tab', 'DictWriter', 'Sniffer']
['Dialect', 'DictReader', 'excel', 'excel_tab', 'DictWriter', 'Sniffer']
Thomas said:['Dialect', 'DictReader', 'excel', 'excel_tab', 'DictWriter', 'Sniffer']pyclbr.readmodule("csv").keys()
Tanks. But I already knew about that one.
The problem is that it returns all the calsses from the imported modules
aswell. I ONLY want the names of the classes declared in the specific
module..
Any ideas?
os.path.basename(c.file) == "testpyclbr.py"][c.name for c in pyclbr.readmodule("testpyclbr").values() if
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.