This is my Python program:
#!/usr/bin/env python
import os
BASE_PATH = os.path.dirname(__file__)
print BASE_PATH
If I run this using python myfile.py
it prints an empty string. If I run it using myfile.py
, it prints the correct path. Why is this? I'm using Windows Vista and Python 2.6.2.