Tkinter - Title Bar Icon

We have added an icon to the title bar. Note the icon needs to be .ico file and in the same location as the .py file.
import tkinter as tk

mywindow = tk.Tk()

def buttonPress():
    print("Button Pressed!!")

def textBox():
def slideValue():
    print (Slider.get())

# Label
label = tk.Label(mywindow, text="Label Text")

# Button
button = tk.Button(mywindow,text='Press',command=buttonPress)

# Textbox
textb = tk.Entry(mywindow,text="Entry")
textbutton = tk.Button(mywindow,text="Text Box",command=textBox)

# Slider
Slider = (tk.Scale(mywindow,label=('Slider'),variable=0))
SliderButton = (tk.Button(mywindow,text='Slider',command=slideValue))

#Keyboard Inputs
def func_return(event):
    print ("You hit return")
mywindow.bind("<Return>", func_return)

def func_w(event):
    print ("You hit w")
mywindow.bind("<KeyPress-w>", func_w)

# Defining the window size
# Fixing the window size
mywindow.resizable(width=False, height=False)
# Title bar Title
mywindow.title('My Title')
# Title Bar Icon
This updates the GUI to be:

Related Sections

Python - Learn the python from the basics up. This fast track example code course will get you creating powerful python programs in no time.
Tkinter - Learn the key features of the tkinter to allow you to create user interfaces for your python programs.

Must Read Articles

Tkinter - Combo Box - This is a short example showing how to use combo boxes in a GUI.
Tkinter - Radio Buttons - A short example of how to create a GUI with radio buttons.
Tkinter _ Canvas - Canvas allows for a range of shapes to be plotted, such as circles, squares, lines and labels.
Tkinter - Pack vs Grid vs Place - tkinter provides flexibility in how the layout the widgets. 
Pickle - The pickle library allows a program to save data in a binary file.
Python - List Comprehension - Create powerful list comprehension expressions.
Python - Generators - Learn about generator statements.
Python - Data types - The learn about the key datatypes in the python language.