I want to know how I could retrieve an ICO (icon) file from a GitHub repository. And then after that, put it as the iconbitmap for a Tkinter window.
Here's my code:
import tkinter as tk
window = tk.Tk()
window.title("Feedback And Rating")
window.geometry("300x350")
window.iconbitmap("https://raw.githubusercontent.com/AngusAU293/Application-Assets/main/Feedback%20And%20Rating%20Example/icon.ico")
I'm using Python 3.
You can download the file using
urllib.request, then set the icon to the downloaded file. Or, as Karl suggested, download the icon beforehand and place in the SAME directory as the Python file, so that the application doesn't need internet to run.