os.popen3() - how to close cmd window automatically?

ddonato at unisa.it ddonato at unisa.it
Wed May 31 09:47:20 EDT 2006


> > # Script "shortcut.py"
> > import os
> > import webbrowser
> > import win32api
> >
> > # open default web browser and display webbpage
> > page = 'C:\\Temp\\Welcome.html'
> > webbrowser.open(page)
> >
> > # path to application that is opened
> > path = "C:\\Program Files\\ExternalApplication.exe"
> >
> > # get short name
> > shortpath = win32api.GetShortPathName(path)
> >
> > # open external application
> > stdin, stdout, stderr = os.popen3(shortpath)
> > output = stdout.read()
> > errors = stderr.read()
> > stdin.close()
> > stdout.close()
> > stderr.close()
> > print output
> > print errors
> > # ----------------------------------------------------------------------
> >
> >
> > In order to [...]

In order to run this on a linux box?
daniel



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the Python-list mailing list