Skip to main content
added 66 characters in body; added 41 characters in body
Source Link
Tendayi Mawushe
  • 26.2k
  • 7
  • 53
  • 57

Consider using the inspect module which has functions like getmodule which might be what are looking for:

>>>import inspect >>>import xml.etree.ElementTree >>>et = xml.etree.ElementTree.ElementTree() >>>inspect.getmodule(xmlet) <module 'xml''xml.etree.ElementTree' from  'D:\tools\python2.5.2\lib\xml\__init__2\lib\xml\etree\ElementTree.pyc'> 

Consider using the inspect module which has functions like getmodule which might be what are looking for:

>>>import inspect >>>import xml >>>inspect.getmodule(xml) <module 'xml' from 'D:\tools\python2.5.2\lib\xml\__init__.pyc'> 

Consider using the inspect module which has functions like getmodule which might be what are looking for:

>>>import inspect >>>import xml.etree.ElementTree >>>et = xml.etree.ElementTree.ElementTree() >>>inspect.getmodule(et) <module 'xml.etree.ElementTree' from  'D:\tools\python2.5.2\lib\xml\etree\ElementTree.pyc'> 
Source Link
Tendayi Mawushe
  • 26.2k
  • 7
  • 53
  • 57

Consider using the inspect module which has functions like getmodule which might be what are looking for:

>>>import inspect >>>import xml >>>inspect.getmodule(xml) <module 'xml' from 'D:\tools\python2.5.2\lib\xml\__init__.pyc'>