20 'APPL', # applications
21 'Atmp', # applet template
23 'MPSY', # SYM and xSYM files
27 sweepfolderre
= re
.compile(r
"(.*) Data$")
31 if os
.path
.isdir(top
):
32 for name
in os
.listdir(top
):
33 path
= os
.path
.join(top
, name
)
39 if os
.path
.isdir(top
):
40 m
= sweepfolderre
.match(top
)
41 if m
and os
.path
.exists(m
.group(1) + ".prj"):
42 print "removing folder:", top
45 for name
in os
.listdir(top
):
46 path
= os
.path
.join(top
, name
)
49 fss
= macfs
.FSSpec(top
)
50 cr
, tp
= fss
.GetCreatorType()
51 if tp
in sweepfiletypes
and top
<> sys
.executable
:
52 print "removing file: ", top
56 fss
, ok
= macfs
.GetDirectory("Please locate the Python home directory")
58 walk(fss
.as_pathname())
59 sys
.exit(1) # so we see the results