running perl script with python -


let say, have perl scipt on unix: trial.pl

print ("hello" world); 

and python on window: python scipt:

subprocess.call("perl trial.pl",shell=true)  

it print "1" in gui means false, why?

it return 0 if perl script executed successfully

>>> rc = subprocess.call('perl /tmp/t.pl', shell=true) hello world >>> rc 0 

so if return 1, means either perl cannot find trial.pl file (you need specify absolute path fix it) or there problem within perl script file (you can run independently verify)


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -