tkinter and image paths - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: tkinter and image paths (/thread-25878.html) |
tkinter and image paths - menator01 - Apr-14-2020 In the project I'm working on, I have to put full paths to images starting from the root directory. Does tkinter not start the path in the working directory? Example (/home/user/path/to/image.png) I don't understand why ./image.png does not work. Image.png is in the same directory. Is it because it's not in the python path? RE: tkinter and image paths - Riddle - Apr-14-2020 If it is in the same directory, you should be able to just refer to the file by its name "image.png" (no need for the './' in front of it). RE: tkinter and image paths - menator01 - Apr-14-2020 It was the editor I am using. If I run the script in shell it works as expected. I guess atom treats path differently. |