Noob: nix path, so confused! (came from Windows)

So, I started my Python journey on Windows and have moved to Linux (Debian 12) and trying to re-write some of my code to work on Linux.

The code I am currently working on will go though a directory and all files matching a pattern (*.vob) will be encoded with FFMPEG. I had this all working 100% on Windows.

The problem I am having is understanding paths… For example, the script resides in ‘/mnt/local/500nvme/LinuxEncode’ which is a mounted local NVME drive. I can R&W to it from Nemo/BASH just fine. When I run my “learning” python script, I get the response that the script is located at ‘/run/flatpak/doc/de384d38/Dev-01.py’. So, naturally, I am totally confused what I am looking at and really need some coaching to better understand. The code is below:

#!/usr/bin/env python3
import os
pathhere = str(os.path.abspath(__file__))
print("path here: ", pathhere)

Additionally, when I specify the path of the folder to scan for *.VOB files (which exist), no file names are returned but they are there.

#!/usr/bin/env python3
import os
from pathlib import Path

#only specifying one folder here, but can be [“folder1”,“folder2”,“folder3”]
folders = [“/mnt/006CDF5B6CDF4A54/DVDdev”]
pattern = “*.vob”
for folder in folders:
files = Path(folder).glob(pattern)
for file in files:
print("File: ", file)

Thanks to anyone that can give me a jump start so I can move forward.
Andrew

It appears to be a behavior of the flatpak install of Thonny, once I removed the flatpak and installed the deb apt the path behavior was as expected.