Python
Appearance
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation via the off-side rule. [1]
Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming. It is often described as a 'batteries included' language due to its comprehensive standard library. [1]
- Project Homepage [EN]
- Python Package Index (PyPI) [EN]
- Python [EN] @ Fedora Package
- Python [EN] @ Homebrew Formula
Documentation
- Tutorial [EN]
- Standard Library [EN]
- Language Reference [EN]
Further Information
- Style Guides
- docopt - Command-line interface description language [EN]
- Python Style Guide [EN] @ Google
- PEP 8 - Style Guide for Python Code [EN]
Components
2 pages found:
Additional Resources
Clients
3 pages found:
Add-ons
5 pages found:
Examples
9 pages found:
- /home/alex/dev/calendar.py (1)
- /home/alex/dev/passwd-gen.py (1)
- /home/alex/dev/progressbar.py (1)
- /home/alex/dev/rename.py (1)
- /home/alex/dev/shorten-url.py (1)
- /home/alex/dev/stdin.py (1)
- /home/alex/dev/sync2mw.py (1)
- /root/bin/mk-named-dhcpd-conf.py (1)
- /home/alex/dev/venv-runner.sh (1)
Hints
- Show a list of all installed modules
import os
import sys
for dir in sys.path:
if os.path.isdir(dir):
for file in os.listdir(dir):
print(file)
NOTE:
This is very helpful when using online compilers like Ideone.com.
import sys
sys.stderr = sys.stdout
- Provide a lightweight HTTP server
python -m 'http.server' 8000 --bind '127.0.0.1' --directory "${HOME}/web"
NOTE:
By default, server binds itself to all interfaces. The option -b / --bind specifies a specific address to which it should bind.
[2]
NOTE:
By default, server uses the current directory. The option -d / --directory specifies a directory to which it should serve the files.
[2]
References
- ↑ 1.0 1.1 Wikipedia contributors. "Python (programming language)." Wikipedia. https://en.wikipedia.org/wiki/Python_(programming_language) (accessed 05.05.2023)
- ↑ 2.0 2.1 Python contributors. "http.server." Python Software Foundation. https://docs.python.org/3/library/http.server.html (accessed 05.05.2023)