Py3esourcezip «2025-2026»

This is simple, but brittle. It relies on the script being run from the specific directory where the data folder exists. If you bundle your application into an executable using tools like PyInstaller, or if you simply want to distribute a single ZIP file containing your code and assets, relative paths break.

cp -r ../src/ .py $WORK_DIR/ cp -r ../src/mypackage/ .py $WORK_DIR/mypackage/ cp config.yaml $WORK_DIR/resources/ py3esourcezip

To read a zip file, you can use the ZipFile class from the zipfile module. This is simple, but brittle