Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Script or library - import

If it is imported by another module then it won't run automatically. We have to call it manually.

import mymodule

print("Name space in import_mymodule.py ", __name__)
mymodule.run()

$ python import_mymodule.py
Name space in mymodule.py  mymodule
Name space in import_mymodule.py  __main__
run in  mymodule