using python for system administration tools.

anthony baxter (anthony.baxter@aaii.oz.au)
Sat, 07 Jan 1995 00:25:45 +1100

This evening's PythonHack:

DEC ship their Printserver printers with this horrid little program
to monitor a printer - it uses an (as far as I could find) undocumented
protocol to talk to the printer, querying it on it's status, receiving
error messages ("put more paper in, stupid", &c). It's curses-based, slow,
and can watch one printer at a time. Not good.

Now, a few hours later, after first sitting down with tcpdump for a while*,
then coding away in python, I have a nice tk-based application, that will
monitor multiple printservers, has an interaction popup, &c. And it even
plugs into my network monitoring meta-program.

* dont try this at home, unless you're feeling like causing yourself
some extreme pain :)

I _really_ like using python for these sorts of tasks - I can work up the
application bit by bit, and very quickly.

Not suprisingly, of the 160 lines of the program, easily 2/3 of it is
dealing with the tk interface. I was just about to comment that this was
a lot, then I thought about how big it would be if I used Motif, and
decided to not bother.

Anyway, just thought I'd mention this, as most people I know regard perl as
the be-all and end-all of languages for system administration, and after
a 'discussion' earlier in the week with a die-hard perl user, I felt the
need to get this off my chest :)

Anthony