Sys.path does not have current directory by default

This miiiight have been better as a continuation of the previous thread, given that it’s still looking at sys.path issues and it’s unclear whether something has suddenly inverted or not. Anyhow.

The default sys.path does NOT include the current directory on any platform. What it usually includes is the script directory.

rosuav@sikorsky:~$ echo 'import sys; print(sys.path)' >tmp/showpath.py
rosuav@sikorsky:~$ python3 tmp/showpath.py 
['/home/rosuav/tmp', '/usr/local/lib/python312.zip', '/usr/local/lib/python3.12', '/usr/local/lib/python3.12/lib-dynload', '/home/rosuav/.local/lib/python3.12/site-packages', '/usr/local/lib/python3.12/site-packages']

You’ll sometimes see this shown as an empty string, in which case the script directory does happen to be the current directory, but in general, it’s the script dir that you have at the head of sys.path.

Does that affect either or both of your threads?