Re: os.popen3() - how to close cmd window automatically?
- From: ddonato@xxxxxxxx
- Date: Wed, 31 May 2006 15:47:20 +0200
# 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.
.
- Prev by Date: wx: PyNoAppError
- Next by Date: Re: Variable name has a typo, but code still works. Why?
- Previous by thread: Re: os.popen3() - how to close cmd window automatically?
- Next by thread: Variable name has a typo, but code still works. Why?
- Index(es):