fork download
  1. from subprocess import call
  2. call(["ls", "-al","/home"])
  3. call(["touch", "/will_this_work"])
  4. call(["ls", "-al","/"])
Success #stdin #stdout #stderr 0.03s 9368KB
stdin
Standard input is empty
stdout
total 12
drwxr-xr-x  3 root root  4096 2014-01-17 14:44 .
drwxr-xr-x 12 root root  4096 2013-10-18 10:08 ..
drwxr-x---  2 root 20109 4096 2014-01-17 14:44 GSxtyN
total 48
drwxr-xr-x 12 root root 4096 2013-10-18 10:08 .
drwxr-xr-x 12 root root 4096 2013-10-18 10:08 ..
drwxr-xr-x  2 root root 4096 2013-10-18 10:06 bin
drwxrwxr-x  3 root root 4096 2013-10-18 10:05 build
drwxr-xr-x  3 root root 4096 2013-10-18 10:05 dev
drwxr-xr-x 28 root root 4096 2013-10-18 10:08 etc
drwxr-xr-x  3 root root 4096 2014-01-17 14:44 home
drwxr-xr-x  5 root root 4096 2013-10-18 10:08 lib
drwxrwxr-x  2 root root 4096 2013-10-18 10:05 spoj
drwxrwxr-x  5 root root 4096 2014-01-17 14:44 tmp
drwxr-xr-x  7 root root 4096 2013-10-18 10:08 usr
drwxr-xr-x 13 root root 4096 2013-10-18 10:05 var
stderr
touch: cannot touch `/will_this_work': Permission denied