Iterate over all Python source files in C{paths}. @param paths: A list of paths. Directories will be recursed into and any .py files found will be yielded. Any non-directories will be yielded as-is.
(paths)
| 94 | |
| 95 | |
| 96 | def iterSourceCode(paths): |
| 97 | """ |
| 98 | Iterate over all Python source files in C{paths}. |
| 99 | |
| 100 | @param paths: A list of paths. Directories will be recursed into and |
| 101 | any .py files found will be yielded. Any non-directories will be |
| 102 | yielded as-is. |
| 103 | """ |
| 104 | for path in paths: |
| 105 | if os.path.isdir(path): |
| 106 | for dirpath, dirnames, filenames in os.walk(path): |
| 107 | for filename in filenames: |
| 108 | full_path = os.path.join(dirpath, filename) |
| 109 | if isPythonFile(full_path): |
| 110 | yield full_path |
| 111 | else: |
| 112 | yield path |
| 113 | |
| 114 | |
| 115 | def checkRecursive(paths, reporter): |
searching dependent graphs…