7 def colour_item(path
, colour
):
8 if os
.path
.isdir(path
):
9 colour_directory(path
, colour
)
11 colour_file(path
, colour
)
13 def colour_directory(path
, colour
):
15 findertools
.label(path
, (8 - colour
) & 7)
17 def colour_file(path
, colour
):
18 fsspec
= macfs
.FSSpec(path
)
19 finfo
= fsspec
.GetFInfo()
20 finfo
.Flags
= (finfo
.Flags
& 0xfff1) |
(colour
<< 1)
21 fsspec
.SetFInfo(finfo
)
23 def get_item_colour(path
):
25 #print "Getting colour of", path ###
26 result
= (8 - findertools
.label(path
)) & 7
27 #print "...result =", result ###
30 def mark_path_untested(path
):
31 #print "Marking untested:", path ###
32 colour_item(path
, no_colour
)
34 def mark_untested(item
):
35 if os
.path
.isdir(item
):
36 colour_directory(item
, no_colour
)
37 for name
in os
.listdir(item
):
38 if name
<> "Reference":
39 mark_untested(os
.path
.join(item
, name
))
40 elif item
.endswith(".pyx"):
41 colour_file(item
, no_colour
)
43 def mark_args_untested():
44 for item
in sys
.argv
[1:]: