title: How to display text at a given position?
body: <p>my first post and am very early in learning Python. Please be gentle.
  I have a piece of code here that works but it is difficult to read the output.
  I would like to display the sensors on screen statically, rather than in an ever ascending list that scrolls down the screen.
  Is it possible to change the print function so it updates the temp every X seconds in a single location on the shell window? Thanks in advance</p>
  
  <pre><code>import os
  import glob
  import time
  
  os.system('modprobe w1-gpio')
  os.system('modprobe w1-therm')
  
  def read_temp_raw(i):
      base_dir = '/sys/bus/w1/devices/'
      device_folder = glob.glob(base_dir + '28*')[i]
      device_file = device_folder + '/w1_slave'
      f = open(device_file, 'r')
      lines = f.readlines()
      f.close()
      return lines
  
  def read_temp(i):
      lines = read_temp_raw(i)
      while lines[0].strip()[-3:] != 'YES':
          time.sleep(0.2)
          lines = read_temp_raw()
      equals_pos = lines[1].find('t=')
      if equals_pos != -1:
          temp_string = lines[1][equals_pos+2:]
          temp_c = float(temp_string) / 1000.0
          temp_f = temp_c * 9.0 / 5.0 + 32.0
          return temp_c, temp_f
  
  while True:
      print "Sensor 1", (read_temp(0))
      print "Sensor 2", (read_temp(1))
      print "Sensor 3", (read_temp(2))
      time.sleep(2)
  </code></pre>