title: Finding the length of a stringvar
body: <p>I am trying to make a function that will add text to a text box if the variable behind it is empty. I was attempting to do this using the .len() function, but I get an </p>
  
  <pre><code>AttributeError: 'StringVar' object has no attribute 'length'. 
  </code></pre>
  
  <p>My code is as follows:</p>
  
  <pre><code>line1var = StringVar()
  
  line1var.set("")
  
  def tobeplaced(value):
  
      global line1var
  
      if line1var.length() == 0:
  
          txtReceipt.insert(END, value)
  
  foo = Button(root, text="foo", command=lambda : tobeplaced("foo")).pack()
  </code></pre>
  
  <p>What do? </p>