title: How to make a flashing text box in tkinter?
body: <p>So my computing class are making a xmas card in python, and for one of the bits there is going to be a text box with a message, but how do I make the background alternate from green and red ? </p>
  
  <p>If someone would be able to help that would be amazing :) </p>
  
  <pre><code>from tkinter import *
  root = Tk()
  root.title("Xmas Message")
  
  #command for the button
  def test_com():
      #removing the button
      act_btn.grid_remove() 
  
  #adding the textbox for the message
  msg_box = Text(root, height = 1, width = 30)
  msg_box.grid(row=0, column=0)
  
  #adding the message
  msg_box.insert(END, "Happy Xmas")
  
  #changing the background to green
  msg_box.config(background="green")
  
  
  #changing the background to red
  msg_box.config(background="red")
  
  root.after(250, test_com)
  
  
  #button for activating the command
  act_btn = Button(root, text = "1", command = test_com)
  act_btn.grid(row=0, column=0)
  
  
  
  
  
  
  root.mainloop()
  </code></pre>