Update
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
|
||||
def MGP_LoadProcess(program, args=[]):
|
||||
if not program or not os.path.isfile(program):
|
||||
return False
|
||||
theArgs = [program]
|
||||
theArgs.extend(args)
|
||||
try:
|
||||
subprocess.Popen(theArgs)
|
||||
except Exception as e:
|
||||
print("Error loading program {}: {}".format(program, e.value))
|
||||
return False
|
||||
|
||||
return True
|
||||
Reference in New Issue
Block a user