## import commands
mystring = commands.getoutput("dtg")
##
then mystring should have "2004122212" (and possibly '\n', but you'll have to check that out, not sure about your command)in it...
Hope it helps, it sure is quicker than popen (I only use popen if I need to keep reading the output, for a one-time capture, I personally prefer the "commands" module...)
Hugo
Ertl, John wrote:
Roger,
I have been doing it the Pythonic way (that is why I have no idea about how Popen works) but I need to make sure (the systems guys called me on it) I use the same dtg as everyone else...it is possible (has not happened yet in 20 years) it could be set to something else.
_______________________________________________ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor