linux - python subprocess module can't execute shell -


[root@localhost root]$ cat test.c #include <stdio.h> int main(int argc, char*argv[]){ system("/bin/sh"); }  [root@localhost root]$ cat auto  #!/usr/bin/env python subprocess.popen(['/root/test']) 

i want use subprocess executing new shell command line

but it's closed don't know why..

what should continuing new shell command line?

if there way same thing instead of subprocess module, please let me know :)

sorry poor english

subprocess needs imported:

#!/usr/bin/env python import subprocess subprocess.popen(['/root/test']) 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -