Sorry I could not update the modified code
import serial from tkinter import * import matplotlib.pyplot as plt from drawnow import * values = [] root = Tk() plt.ion() cnt=0 var = StringVar() serialArduino = serial.Serial('COM3',baudrate = 9600, timeout = 1) root.title("D Cube Serial Read") e = Entry(root,width = 35, textvariable = var ,borderwidth = 5) e.grid(row = 0, column = 0, columnspan = 3,padx = 10,pady = 10) def plotValues(): plt.legend(loc='upper right') while True: while (serialArduino.inWaiting()==0): pass valueRead = serialArduino.readline() print(valueRead) #check if valid value can be casted try: valueInInt = int(valueRead) print(valueInInt) e.delete(0,END) #e.insert(1,valueInInt) var.set(valueInInt) #drawnow(plotValues) except ValueError: print ("Invalid! cannot cast")as you can see the I commented the following line then widgets does not open but on the python shell values are displayed
#drawnow(plotValues)