Another thing that I think is worth noting when to perform
python -m some_module some_arguments
The python interpreter will look for the " main .py" file in the module path to execute. This is equivalent to:
python path_to_module/__main__.py somearguments
It will execute the contents after:
if __name__ == "__main__":
If the file does not exist, this module cannot be executed directly.
source share