When I run this code in python 2.7, I get this error:
Traceback (most recent call last): File \"C:\\Python26\\Lib\\site-packages\\pyutilib.subprocess-3.5.4\\
I solved it by treating file as a string, i.e. put "__file__" (together with the quotes!) instead of __file__
"__file__"
__file__
This works fine for me:
wk_dir = os.path.dirname(os.path.realpath('__file__'))