Python: Difference between revisions
Jump to navigation
Jump to search
Created page with " Category:Python Category:Programming" |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
* Every file of Python source code that ends in <code>.py</code> is a module - no special code or naming is required. | |||
* <code>dir</code> fetches all names available inside a module: <code>dir(modname)</code> | |||
* Each file is a self-contained namespace. | |||
* reloads are not transitive, so reloading module A which imports module B does not reload B. | |||
* To run a script: <code>exec(open('script.py').read())</code> | |||
== Links == | |||
* [https://learning-python.com/ Learning Python] - From the author of Learning Python and Programming Python. | |||
* [https://gregoryszorc.com/blog/2019/06/24/building-standalone-python-applications-with-pyoxidizer/ Building Standalone Python Applications with PyOxidizer] | |||
== Books == | |||
* [https://www.manning.com/books/practices-of-the-python-pro Practices of the Python Pro] | |||
[[Category:Python]] | [[Category:Python]] | ||
[[Category:Programming]] | [[Category:Programming]] |
Latest revision as of 15:28, 5 December 2019
- Every file of Python source code that ends in
.py
is a module - no special code or naming is required. dir
fetches all names available inside a module:dir(modname)
- Each file is a self-contained namespace.
- reloads are not transitive, so reloading module A which imports module B does not reload B.
- To run a script:
exec(open('script.py').read())
Links
- Learning Python - From the author of Learning Python and Programming Python.
- Building Standalone Python Applications with PyOxidizer