python:python_misc:python_modules_name_and_main
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python:python_misc:python_modules_name_and_main [2022/10/22 01:48] – [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 1: | Line 1: | ||
====== Python modules, __name__ and " | ====== Python modules, __name__ and " | ||
Mithat Konar\\ | Mithat Konar\\ | ||
- | Oct 18, 2022 | + | Oct 21, 2022 |
===== What's a module? ===== | ===== What's a module? ===== | ||
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.1666403332.txt.gz · Last modified: 2022/10/22 01:48 by mithat