title: inserting a convertage percentage into a database
body: <p>right my aim for this piece is to get the printed value into a database but on query from terminal the database returns the floating point not the printed value is there a way to force this to pass over to the database. 
  here is my code </p>
  
  <pre><code>def getCpuLoad():
     """
     Returns the cpu load as a value from the interval [0.0, 1.0]
     """
     dt = list(deltaTime(INTERVAL))
     idle_time = float(dt[3])
     total_time = sum(dt)
     load = 1-(idle_time/total_time)
     return load
  
  
  
  def diskspace():
    stats = os.statvfs('/opt')
    freespace = stats.f_bavail * stats.f_frsize
    freespace / 1048576
    return freespace
  
  while True:
    print time.strftime("%A, %B, %d, %Y, %H, %M"),"CPU usage=%.2f%%" % (getCpuLoad()*100) 
    cursor.execute('''INSERT INTO mytable (Date, Cpu) VALUES (?,?)''',(today, getCpuLoad()))
    print time.strftime("%A, %B, %d, %Y, %H, %M"), diskspace()
    cursor.execute('''INSERT INTO mytable (Date, free) VALUES (?,?)''',(today,diskspace())) 
  </code></pre>
  
  <p>cursor.commit() 
  as it can be seen, I do the rounding of the floating point at print but as said above it only inserts it without the conversion. can anyone help please be clear as i am still learning both. python and sqlite3.</p>