Pay attention to the leftmost value of sys.path, besides the empty string...
from root directory, python -c "import sys; print(sys.path)"
gives me:
['', '/home/brian/code/indep/chimai', '/home/brian/code/indep/google_search/src', '/usr/lib/python33.zip',
'/usr/lib/python3.3', '/usr/lib/python3.3/plat-linux', '/usr/lib/python3.3/lib-dynload', '/usr/lib/python3.3/site-packages']
from my home directory:
['', '/home/brian/home/brian/code/indep/chimai', '/home/brian/code/indep/google_search/src',
'/usr/lib/python33.zip', '/usr/lib/python3.3', '/usr/lib/python3.3/plat-linux', '/usr/lib/python3.3/lib-dynload',
'/usr/lib/python3.3/site-packages']
from /boot/grub:
['', '/boot/grub/home/brian/code/indep/chimai', '/home/brian/code/indep/google_search/src', '/usr/lib/python33.zip',
/usr/lib/python3.3', '/usr/lib/python3.3/plat-linux', '/usr/lib/python3.3/lib-dynload', '/usr/lib/python3.3/site-packages']
This behavior continues no matter what directory I test from. That is, the second and third values of sys.path you see should be loaded from my PYTHONPATH variable, but the first one always gets my current directory appended to the front of it.
Also, python -Sc "import sys; print(sys.path)
doesn't do this, for some reason. With that command, I always get:
['', 'home/brian/code/indep/chimai', '/home/brian/code/indep/google_search/src', '/usr/lib/python33.zip',
'/usr/lib/python3.3/', '/usr/lib/python3.3/plat-linux', '/usr/lib/python3.3/lib-dynload']
This is all very surprising. Is site.py responsible for this some how? Can someone point me in the right direction? I am just trying to import my own module, and am currently unable to for some reason.