-
Notifications
You must be signed in to change notification settings - Fork 34
Using rm protection in Python
Alan Chan edited this page Feb 5, 2017
·
1 revision
rm-protection is written to be reusable.
Currently it provides two modules: rm_p and protect.
rm_p.rm() is the rm-p equivlent in command line. Unlike in the command line, you need to feed it with a list of arguments.
rm_p.rm() is the protect equivlent in the command line. It takes a list of file names.
from rm_protection.rm_p import rm
from rm_protection.protect import protect
rm(['-rf', 'file1', 'file2', 'dir1'])
protect(['foo', 'bar'])