python:python_misc:python_modules_name_and_main
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
python:python_misc:python_modules_name_and_main [2022/10/22 01:49] – [Python modules, __name__ and "__main__"] mithat | python:python_misc:python_modules_name_and_main [2022/10/22 01:52] (current) – [What’s in a __name__?] mithat | ||
---|---|---|---|
Line 103: | Line 103: | ||
===== What’s in a __name__? ===== | ===== What’s in a __name__? ===== | ||
- | Every Python file that’s used in a program has a '' | + | Every Python file that’s used in a program has a '' |
- | However, when the file is //not// imported as a module, which is to say when a file is run as a program, its '' | + | However, when the file is //not// imported as a module, which is to say when a file is run as a program, its '' |
<code python> | <code python> |
python/python_misc/python_modules_name_and_main.1666403354.txt.gz · Last modified: 2022/10/22 01:49 by mithat