MCPcopy Create free account
hub / github.com/ActiveState/code / main

Function main

recipes/Python/464411_Profile_Cleanup/recipe-464411.py:3–13  ·  view source on GitHub ↗
(path='')

Source from the content-addressed store, hash-verified

1import os, sys
2
3def main(path=''):
4 if len(sys.argv) == 1 and len(path) != 0:
5 try:
6 delete(path)
7 except:
8 print 'ERROR: Internal Path'
9 else:
10 try:
11 delete(' '.join(sys.argv[1:]))
12 except:
13 print os.path.basename(sys.argv[0]), '<directory>'
14
15def delete(path):
16 for name in os.listdir(path):

Callers 1

recipe-464411.pyFile · 0.70

Calls 2

deleteFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected