Miscellany
public text v1 · immutable(work)(~) $ cat remove
import os
file = "/tmp/toremove"
if os.path.exists(file):
print "trying to remove... ",
if os.remove(file):
print "yes"
else:
print "no"
else:
print "it does not exist"
(work)(~) $ touch /tmp/toremove
(work)(~) $ ls /tmp/toremove
/tmp/toremove
(work)(~) $ python remove
trying to remove... no
(work)(~) $ ls /tmp/toremove
ls: /tmp/toremove: No such file or directory
(work)(~) $