import os import sys path = os.path.join(os.path.dirname(sys.argv[0]), 'index.html') print path