Redirecting the results of the AGSSOM.EXE -List command

Discussion created by kreuzrsk on May 11, 2011
Latest reply on May 11, 2011 by curtvprice
I writen a short program that outputs to a file the services and their statuses using the AGSSOM.EXE executable from ESRI.  Next I read in the file in so I can take various actions depending on what services are "stopped."

execstring = "agssom.exe " + server_name + " -list > " + outfile

But I'd rather redirect the output from the agssom.exe command directly into a variable within my python script and eliminate the need to read a file.  Any ideas?