Site Tools


python:start

Python

Package import

When source files are spread over different folders. Name space packages can be imported by adding the relateve folders to sys path like. for instance when test scripts separated from source files, in the test script the following can get the source file in scope.

import sys
sys.path += ["../parentfolder/subfolder"]

Path needs to be added before the import statements of the files in the related folder.

(python docs) Import system

Python 101

Interresting site with a lot of info about Python.

https://python101.pythonlibrary.org/index.html

Reading string as file

processing a string like a open file.

String to file object

Geeks for geeks

Tools

UV

// “A single tool to replace pip, pip-tools, pipx, poetry, pyenv, virtualenv, and more.” // UV docs UV git

Codeflash

python/start.txt · Last modified: by Niels