Add prune_dirs module docstring.
This commit is contained in:
parent
83d5993b66
commit
32395c0935
1 changed files with 10 additions and 2 deletions
|
@ -1,7 +1,16 @@
|
||||||
|
'''
|
||||||
|
This program deletes all empty directories which are children of the given
|
||||||
|
starting directory. The starting directory itself will not be deleted even
|
||||||
|
if it is empty.
|
||||||
|
|
||||||
|
> prune_dirs .
|
||||||
|
> prune_dirs C:\\somepath
|
||||||
|
'''
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from voussoirkit import betterhelp
|
||||||
from voussoirkit import spinal
|
from voussoirkit import spinal
|
||||||
from voussoirkit import pathclass
|
from voussoirkit import pathclass
|
||||||
|
|
||||||
|
@ -37,8 +46,7 @@ def main(argv):
|
||||||
parser.add_argument('starting')
|
parser.add_argument('starting')
|
||||||
parser.set_defaults(func=prune_dirs_argparse)
|
parser.set_defaults(func=prune_dirs_argparse)
|
||||||
|
|
||||||
args = parser.parse_args(argv)
|
return betterhelp.single_main(argv, parser, docstring=__doc__)
|
||||||
return args.func(args)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
raise SystemExit(main(sys.argv[1:]))
|
raise SystemExit(main(sys.argv[1:]))
|
||||||
|
|
Loading…
Reference in a new issue