Zachary Turner | 8741e31 | 2015-10-20 21:05:57 +0000 | [diff] [blame^] | 1 | import inspect |
| 2 | import os |
| 3 | import sys |
| 4 | |
| 5 | def add_third_party_module_dirs(lldb_root): |
| 6 | third_party_modules_dir = os.path.join(lldb_root, "third_party", "Python", "module") |
| 7 | if not os.path.isdir(third_party_modules_dir): |
| 8 | return |
| 9 | |
| 10 | module_dirs = os.listdir(third_party_modules_dir) |
| 11 | for module_dir in module_dirs: |
| 12 | module_dir = os.path.join(third_party_modules_dir, module_dir) |
| 13 | sys.path.append(module_dir) |
| 14 | lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe())) |
| 15 | add_third_party_module_dirs(lldb_root) |