I am using python to generate command list for another software interface. Using command
sensorik.cmd('list curve')
will put the text
list curve
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
sideset 1 curve 1
sideset 2 curve 2
sideset 3 curve 3
I used
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)')
This however, doesnot work and the interface gets the command
print "sideset %d curve %d" % (curveID, curveID)
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
print "sideset %d curve %d" % (curveID, curveID)
print "sideset %d curve %d" % (curveID, curveID)
print "sideset %d curve %d" % (curveID, curveID)
any suggestions?