Parsing stdout through a pipe?

MK MK at
Sat Jul 12 19:05:20 CEST 2003

I have a Win32 console application (SNMPUTIL.EXE) which listens
to incoming SNMP messages:

C:\>snmputil trap
snmputil: listening for traps...

When a trap is generated on a remote server, it is being sent to
the PC running SNMPUTIL.EXE, and  then finally printed out to
stdout like this:

snmputil: trap generic=6 specific=11003
  from ->
Variable = system.sysName.0
Value    = String DEAUDIIP109387
Variable =
Value    = Integer32 0
Variable =
Value    = String Compaq Management Agents Test Trap sent - Samstag, 12.
Juli 2003 18:52:19

I'd like to write a Python application which would intercept/parse this
output, and invoke various pop-ups ("alarms"). Any ideas?

More information about the Python-list mailing list