====== Python ======
===== Basics =====
https://www.w3schools.com/python/python_intro.asp
[[https://docs.python.org/3/tutorial/|https://docs.python.org/3/tutorial/]]
===== Installation =====
PIPX Install and Run Python Applications in Isolated Environments
[[https://pypa.github.io/pipx/|https://pypa.github.io/pipx/]]
Tumbleweed: systemweite Installation über zypper install python-xyz. z.B. python311-rsa
**venv anlegen**
[[https://wiki.ubuntuusers.de/venv/|https://wiki.ubuntuusers.de/venv/]]
python3 -m venv /home/BENUTZER/venv-test
**venv beenden**
(ampki) thommie@odysseus4:~/git/gitlabdevo/mbag/ampki> source activate
bash: activate: Datei oder Verzeichnis nicht gefunden
(ampki) thommie@odysseus4:~/git/gitlabdevo/mbag/ampki> source bin/activate
(ampki) thommie@odysseus4:~/git/gitlabdevo/mbag/ampki> deactivate
thommie@odysseus4:~/git/gitlabdevo/mbag/ampki>
**venv reaktivieren**
source /home/BENUTZER/venv-test/bin/activate
===== Einfacher http Server =====
(ampki) thommie@odysseus4:~/git/gitlabdevo/mbag/ampki> python3 -m RangeHTTPServer 8888
Serving HTTP on 0.0.0.0 port 8888 (http://0.0.0.0:8888/) ...
127.0.0.1 - - [15/Apr/2025 11:22:22] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [15/Apr/2025 11:22:22] code 404, message File not found
127.0.0.1 - - [15/Apr/2025 11:22:22] "GET /favicon.ico HTTP/1.1" 404 -
{{:screenshot_20250415_112517.png?400|}}