Getting a list of all modules

wxjmfauth at gmail.com wxjmfauth at gmail.com
Wed Jul 30 15:42:28 CEST 2014


Le mercredi 30 juillet 2014 09:43:10 UTC+2, Steven D'Aprano a écrit :
> I'm looking for a programmatic way to get a list of all Python modules 
> 
> and packages. Not just those already imported, but all those which 
> 
> *could* be imported.
> 
> 
> 

>>> 
>>> sys.path.append(r'D:\unicode_in_python_is_a_broken_mess')
>>> import steven
>>> steven.msg
'think a little bit...'
>>>

jmf



More information about the Python-list mailing list