tkinter.iconbitmap

How to solve file not found problem in python?

本秂侑毒 提交于 2021-02-17 05:21:45
问题 I had made a program where I require files from that directory where the python file is located. The files are located in the same folder where the python file located. I can't write the full path of the file in the python script I used the ./ method in the script but it gives error Please help me to solve the problem here is my code ''' #code root=Tk() root.title("SOHAM YOUTUBE VIDEO DOWNLOADER") root["bg"]='#1F1F1F' root.iconbitmap("./img/youtube_(1).ico") root.geometry("900x680") file

How to solve file not found problem in python?

荒凉一梦 提交于 2021-02-17 05:21:28
问题 I had made a program where I require files from that directory where the python file is located. The files are located in the same folder where the python file located. I can't write the full path of the file in the python script I used the ./ method in the script but it gives error Please help me to solve the problem here is my code ''' #code root=Tk() root.title("SOHAM YOUTUBE VIDEO DOWNLOADER") root["bg"]='#1F1F1F' root.iconbitmap("./img/youtube_(1).ico") root.geometry("900x680") file

Set window icon

大城市里の小女人 提交于 2019-12-17 04:59:16
问题 When I tried to change the window icon in the top left corner from the ugly red "TK" to my own favicon using the code below, Python threw an error: from tkinter import * root = Tk() #some buttons, widgets, a lot of stuff root.iconbitmap('favicon.ico') This should set the icon to 'favicon.ico' (according to a lot of forum posts all over the web). But unfortunately, all this line does is throw the following error: Traceback (most recent call last): File "d:\ladvclient\mainapp.py", line 85, in