Python: Difference between revisions

From Rixort Wiki
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:


* [https://learning-python.com/ Learning Python] - From the author of Learning Python and Programming Python.
* [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]


[[Category:Python]]
[[Category:Python]]
[[Category:Programming]]
[[Category:Programming]]

Revision as of 14:36, 2 July 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