====== Python ====== ===== Tutorials ===== *[[http://www.greenteapress.com/|Green Tea Press: Free Computer Science Books]] * [[http://www.google.com/edu/tools-and-solutions/guide-for-technical-development/index.html|Google Tech Dev Guide]] - Grow Your Technical Skills with Google ===== Tipps ===== * **Python-Skript via Batch** starten ([[https://redd.it/729u0t/|Quelle auf Reddit]]) * ''%%cmd /k "python -m srcFolder.main"%%'' * besser (''your_python_script_file_without_extension'' hat in diesem Fall eine\\ ''if __name__ == 'main''-"Methode"): cmd /k "call venv\scripts\activate & python -m src.your_python_script_file_without_extension"\\ oder noch besser: venv activaten, dann ins src-Verzeichnis springen und dort den Bot starten; klappt beim Tender-Screening!\\ cmd /k "call venv\Scripts\activate & cd src & python -m your_python_script_file_without_extension" * v.a. wenn der 'venv'-Ordner nicht im src-Ordner sondern auf gleicher Ebene liegt * **pip-Packages lokal**/offline installieren (via cmd.exe) - von pypi.org im jeweiligen Package unter "Download files" die .tar.gz-Datei herunterladen - die .tar.gz-Datei mit 7-ZIP öffnen und den Ordner in der .tar-Datei (gleicher Name wie die .tar.gz-Datei) auf gleiche Ebene legen wie ''venv''-Ordner vom Projekt - ggf. vorher ''%%venv\Scripts\activate%%'' - ''%%pip install ./packagename-1.3.3.7%%'' ==== Package-Management ==== pipx is not a tool for managing a projects virtual environment. It is used to install command line applications (implemented as Python packages e.g. ruff, mypy, ...) in isolated environments, while making the CLI of those applications available globally (i.e. without needing to activate a virtual environment). * [[https://www.reddit.com/r/learnpython/comments/jq5miv/comment/gblibwq/|pip vs. pipx]] * [[https://dev.to/bowmanjd/python-tools-for-managing-virtual-environments-3bko|Übersicht zum Managen von Virtual Environments]]