import sys, os print sys.path[0]
will print the directory where this script resides. additionally you can use
sys.argv[0]
to get the filename of the script. to join the two do
os.path.join(sys.path[0], sys.argv[0])