This is necessary so that we get the imports from the same directory where the file we are completing is located.
(directory)
| 87 | |
| 88 | |
| 89 | def complete_from_dir(directory): |
| 90 | """ |
| 91 | This is necessary so that we get the imports from the same directory where the file |
| 92 | we are completing is located. |
| 93 | """ |
| 94 | global currDirModule |
| 95 | if currDirModule is not None: |
| 96 | if len(sys.path) > 0 and sys.path[0] == currDirModule: |
| 97 | del sys.path[0] |
| 98 | |
| 99 | currDirModule = directory |
| 100 | sys.path.insert(0, directory) |
| 101 | |
| 102 | |
| 103 | def change_python_path(pythonpath): |