Skip to content

Poco_conf.py:_Configure_an_IBOB_over_Ethernet_w__Python

David MacMahon edited this page Mar 15, 2020 · 1 revision

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)

t.close() fd.close()

  1. Save this, and run it (replacing filename.py for the real filename):

  2. python filename.py

Clone this wiki locally