I need to import my module foo.py if I've got an absolute path (so module is located in "users/suv/desktop/pr1/pyth" but can be located in any different path as well) . I tried
import sys
MYDIR = "users/suv/desktop/pr1/pyth"
sys.path.append(MYDIR)
import foo
and I have the following mistake:
Traceback (most recent call last):
File "./stats", line 7, in <module>
import foo
ImportError: No module named foo
So what am I doing wrong?
Cheers