How to get the list of imported variables/functions
Emile van Sebille
emile at fenx.com
Tue May 2 14:18:01 EDT 2000
Well, I got this to work:
a = dir(sys.modules['imported_mod'])
then filter as needed.
I couldn't get the keys attribute of the module though. Should
I have been able to?
Emile van Sebille
emile at fenx.com
-------------------
Michael Hudson <mwh21 at cam.ac.uk> wrote in message
news:<m33do0kf89.fsf at atrus.jesus.cam.ac.uk>...
<snip>
> Ah, that's probably because I used a string method; try
>
> filter(lambda s:s[1]<>'_',sys.module['imported_mod'].keys())
>
> instead.
>
>
More information about the Python-list
mailing list