| 110 | source_list = [] |
| 111 | |
| 112 | def walk_children(child): |
| 113 | global source_list |
| 114 | global source_ext |
| 115 | |
| 116 | # print child |
| 117 | full_path = child.rfile().abspath |
| 118 | file_type_list = full_path.rsplit('.',1) |
| 119 | #print file_type |
| 120 | if (len(file_type_list) > 1): |
| 121 | file_type = full_path.rsplit('.',1)[1] |
| 122 | |
| 123 | if file_type in source_ext: |
| 124 | if full_path not in source_list: |
| 125 | source_list.append(full_path) |
| 126 | |
| 127 | children = child.all_children() |
| 128 | if children != []: |
| 129 | for item in children: |
| 130 | walk_children(item) |
| 131 | |
| 132 | def PrefixPath(prefix, path): |
| 133 | path = os.path.abspath(path) |