class A:
def __init__(self):
pass
def main():
print("Hello World")
if __name__ == '__main__':
main()
Search This Blog
Showing posts with label module. Show all posts
Showing posts with label module. Show all posts
main function in python module
Python: module file name conflicts with the package name
I have a python module file named xml.py, in the module
When executing the file, it raises the following error:
import xml.etree.ElementTree as ET
... ...
According the stackoverflow post, it was caused by the moudle file name xml.py, rename the xml.py to something else resolved the issue.
ImportError: No module named etree.ElementTree
Subscribe to:
Posts (Atom)