title: Parsing the commands to another software interface using python
body: <p>I am using python to generate command list for another software interface.
  Using command</p>
  
  <pre><code>sensorik.cmd('list curve')
  </code></pre>
  
  <p>will put the text </p>
  
  <pre><code>list curve
  </code></pre>
  
  <p>in that interface and it lists all curves in that program up to that point. Now I have to introduce a loop of commands, here is a sample</p>
  
  <pre><code>sideset 1  curve 1
  sideset 2  curve 2
  sideset 3  curve 3
  </code></pre>
  
  <p>I used</p>
  
  <pre><code>for curveID in range (1, 4):
  print "sideset %d  curve %d" % (curveID, curveID)
  sensorik.cmd('print "sideset %d  curve %d" % (curveID, curveID)')
  sensorik.cmd('sideset %d  curve %d" % (curveID, curveID)')
  </code></pre>
  
  <p>This however, doesnot work and the interface gets the command</p>
  
  <pre><code>print "sideset %d  curve %d" % (curveID, curveID)
  </code></pre>
  
  <p>and it does print the required text on the shell prompt but does not parse it to the software when used in sensorik.cmd. Instead the software gets</p>
  
  <pre><code>print "sideset %d  curve %d" % (curveID, curveID)
  print "sideset %d  curve %d" % (curveID, curveID)
  print "sideset %d  curve %d" % (curveID, curveID)
  </code></pre>
  
  <p>any suggestions?</p>