Reputation: 31
I'm trying to get an image to show on the screen. I have the image file and code file in the same folder. I tried using the image file name and it said that there is no such file or directory. How do I do that?
Upvotes: 0
Views: 310
Reputation: 195
I think you should try to write absolute path. you can use following code
import os
path = os.getcwd()
abs_path = path + img_name
Upvotes: 1