I need to run an exe file in Linux which has the Python code:
import os
dirname = os.path.normpath(os.getcwd())
print(dirname)
When I run the code with the command python code.py
, it runs fine
and gives me the output : \root\path\to\file
.
But when I try to run the exe file with the command wine64 code.exe
,
which has the same python code, It gives me the output : Z:\root\path\to\file
.
I tried to fix it by adding dirname = dirname.replace('Z:', '')
,
but it doesn't work, How to do this?
source https://stackoverflow.com/questions/71991561/incorrect-path-of-executable-file-in-linux
Comments
Post a Comment