title: How can I update a text box 'live' in tkinter?
body: <p>I would like to ask how would I go about maybe creating a 'LIVE' text box in python? This program is a simulator for a vending machine (code below). I want there to be a text box showing a live credit update How do you do that in tkinter?</p>
  
  <p>For Example: Say there is a box for credit with 0 inside it in the middle of the window. When the <code>10p</code> button is pressed the box for credit should change from '0' to '0.10'.
  Is it possible to do thit in tkinter and python 3.3.2?
  Thank you in advance!</p>
  
  <pre><code>import sys
  import tkinter as tk
  
  credit = 0
  choice = 0
  
  credit1 = 0
  coins = 0
  prices = [200,150,160,50,90]
  item = 0
  i = 0
  temp=0
  n=0
  choice1 = 0
  choice2 = 0
  
  credit1 = 0
  coins = 0
  prices = [200,150,160,50,90]
  item = 0
  i = 0
  temp=0
  n=0
  choice1 = 0
  choice2 = 0
  
  def addTENp():
      global credit
      credit+=0.10
  
  def addTWENTYp():
      global credit
      credit+=0.20
  
  def addFIFTYp():
      global credit
      credit+=0.50
  
  def addPOUND():
      global credit
      credit+=1.00
  
  def insert():
      insert = Tk()
  
      insert.geometry("480x360")
      iLabel = Label(insert, text="Enter coins.[Press Buttons]").grid(row=1, column=1)
  
      tenbutton = Button(insert, text="10p", command = addTENp).grid(row=2, column=1)
      twentybutton = Button(insert, text="20p", command = addTWENTYp).grid(row=3, column=1)
      fiftybutton = Button(insert, text="50p", command = addFIFTYp).grid(row=4, column=1)
      poundbutton = Button(insert, text="£1", command = addPOUND).grid(row=5, column=1)
  
  
  insert()
  </code></pre>