Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import lxml
- full_xml_tree = lxml.etree.parse('myfile.xml')
- AttributeError: module 'lxml' has no attribute 'etree'
- import lxml.etree
- full_xml_tree = lxml.etree.parse('myfile.xml')
- import xml.etree.ElementTree as ET
- tree = ET.parse('myfile.xml')
- test_pkg/__init__.py
- test_pkg/shown_module.py
- test_pkg/hidden_module.py
- from . import shown_module
- >>> import test_pkg
- >>> test_pkg.shown_module
- <module 'test_pkg.shown_module' from '.../test_pkg/shown_module.py'>
- >>> test_pkg.hidden_module
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- AttributeError: module 'test_pkg' has no attribute 'hidden_module'
- >>> import test_pkg.hidden_module
- >>> test_pkg.hidden_module
- <module 'test_pkg.hidden_module' from '.../test_pkg/hidden_module.py'>
Add Comment
Please, Sign In to add comment