I have used relative path names in my application:
for example:
logo_image = Image.open("./data/logo.png")
everything has worked fine until now... I have compiled my code into exe and made installer, but if I make shortcut to windows desktop all those relative pathnames doesn't work anymore.
what is a proper way to write path names?
I can't write absolute path names either because my program could be located anywhere.
is there a way to get the directory location where my app is?
for example:
logo_image = Image.open("./data/logo.png")
everything has worked fine until now... I have compiled my code into exe and made installer, but if I make shortcut to windows desktop all those relative pathnames doesn't work anymore.
what is a proper way to write path names?
I can't write absolute path names either because my program could be located anywhere.
is there a way to get the directory location where my app is?
Comment