1 '''
2 Created on Apr 22, 2011
3
4 @author: shreyas
5 @summary: This is intended to be a collection of helper routines used by different QSTK modules
6 '''
7
8 import dircache
9 import os
10
12 '''
13 @summary: Removes any previous files in the list of paths.
14 '''
15
16 if (type(paths_to_clean) is str):
17 temp= paths_to_clean
18 paths_to_clean= list()
19 paths_to_clean.append(temp)
20
21
22
23 for path in paths_to_clean:
24 files_at_this_path = dircache.listdir(str(path))
25 for _file in files_at_this_path:
26 if (os.path.isfile(path + _file)):
27 os.remove(path + _file)
28
29
30
31
32
33