changes to _native use
This commit is contained in:
parent
99090a20f0
commit
d9a155ccba
1 changed files with 4 additions and 1 deletions
5
mk.py
5
mk.py
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
import os,sys,subprocess
|
import os,sys,subprocess
|
||||||
|
|
||||||
|
# note: change this to True when *not* on windows
|
||||||
|
_native = False
|
||||||
|
|
||||||
|
# native()/bash()/exec() utility functions
|
||||||
def native(cmd):
|
def native(cmd):
|
||||||
print(cmd)
|
print(cmd)
|
||||||
retval = os.system(cmd)
|
retval = os.system(cmd)
|
||||||
|
|
@ -16,7 +20,6 @@ def bash(cmd):
|
||||||
if retval != 0:
|
if retval != 0:
|
||||||
sys.exit(retval)
|
sys.exit(retval)
|
||||||
|
|
||||||
_native = False # modify this when needed
|
|
||||||
def exec(cmd):
|
def exec(cmd):
|
||||||
if _native:
|
if _native:
|
||||||
return native(cmd)
|
return native(cmd)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue