A couple pointers for dealing with files on the filesystem from inside python:
- don't modify
sys.path
- don't use relative paths unless they are relative to something
- always use
os.path.join
- don't rely on the environment
Now for a pattern that I strong suggest:
Start with a code tree where your files are set aside but inside your code tree: