Chris Hallman wrote:
I'm not very experienced with programming, writing
> Python, using functions, OOP, etc., therefore I'd like to know if there
> is a better way to do this:
It looks pretty good to me. A few suggestions below.
> import telnetlib, re, os, string
>
> dirpath = (r"c:\temp\sun")
I created a script that parses a directory, strips the ".txt"
extension off the file, telnet & log on to the device (the filename
is the device name), opens the associated ".txt" file, sends all the
commands containted in the file to the device and then executes some
commands to save the changes.