import telnetlib
import time
t = telnetlib.Telnet('169.254.128.5') #ibob address fd = open('parspecTofu.txt') #file with configuration commands
for line in fd.readlines():
if not line.startswith('#'): # don't process lines that start with a pound sign t.write(line) print "Writing:", line time.sleep(1)
if not line.startswith('#'): # don't process lines that start with a pound sign
t.write(line)
print "Writing:", line
time.sleep(1)
t.close() fd.close()
Save this, and run it (replacing filename.py for the real filename):
python filename.py
There was an error while loading. Please reload this page.