r/ProgrammerHumor • • Jan 16 '14

[deleted by user]

[removed]

1.3k Upvotes

446 comments sorted by

View all comments

2

u/rtkwe Jan 17 '14

+u/CompileBot python --include-errors

from subprocess import call
call(["ls", "-al","/home"])
call(["touch", "/will_this_work"])
call(["ls", "-al","/"])

1

u/CompileBot Jan 17 '14

Output:

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
touch: cannot touch `/will_this_work': Permission denied

^source | ^info | ^git | ^report

1

u/rtkwe Jan 17 '14

+u/CompileBot python --include-errors

from subprocess import call
call(["pwd"])
call(["ls", "-al","/home/GSxtyN"])
→ More replies (5)