title: Python, sending command to GPIB instrument
body: <p>I need to send a command to a GPIB instrument and I can do it like this: <code>power.write("volt 0.01")</code>.<br>
  This command sets the output of my power source to 0.01V, however, I'm trying to take an I-V curve and want to set the source to different values and take a measurement at each value. I basically need some sort of loop to do this for me.  I tried the following:</p>
  
  <pre><code>k=0
  while k&lt;= 1:
      power.write("volt k")
      k=k+0.01
  </code></pre>
  
  <p>This doesn't work because k gets send as <code>'k'</code>, not as a number. How do I fix this?</p>