My favorites
▼
|
Sign in
johanscode
Johan's Code Fragments
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
devblog
/
python
/
runcmd.py
r97
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import subprocess
def runcmd(cmd):
try:
f = subprocess.Popen(cmd,shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
stdout = f.stdout.read();
stderr = f.stderr.read();
if f.stdout.close() == None and f.stderr.close() == None:
return True,stdout,stderr
else:
return False,stdout,stderr
except OSError,x:
return False,x
Show details
Hide details
Change log
r42
by djjordaan on Nov 12, 2009
Diff
[No log message]
Go to:
/devblog/python
/devblog/python/runcmd.py
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 391 bytes, 15 lines
View raw file
Powered by
Google Project Hosting