Reputation: 47
When I run
print(__file__)
in Spyder, the absolute location is returned (e.g. C:\Users\test\test.py).
However, when I run the same code after I compiled it into an exe via pyinstaller, only the name of the py file is printed (just test.py).
How can I fix this?
Upvotes: 0
Views: 158