repo.or.cz
/
PyX
/
mjg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
typo
[PyX/mjg.git]
/
pyx
/
pycompat.py
blob
967b02ae3c8b19f15e7782fa5ca50c38614e370b
1
def
popen
(
cmd
,
mode
=
"r"
):
2
try
:
3
import
subprocess
4
return
subprocess
.
Popen
(
cmd
,
shell
=
True
,
bufsize
=
bufsize
,
stdout
=
PIPE
).
stdout
5
except
ImportError
:
6
import
os
7
return
os
.
popen
(
command
,
mode
)
8