File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 1- """ Pymode utils. """
1+ """Pymode utils."""
22import os .path
33import sys
44import threading
55import warnings
66from contextlib import contextmanager
77
8- import vim # noqa
8+ import vim # noqa
99from ._compat import StringIO
1010
1111
1616
1717@contextmanager
1818def silence_stderr ():
19- """ Redirect stderr. """
19+ """Redirect stderr."""
2020 if DEBUG :
2121 yield
2222
@@ -36,4 +36,13 @@ def patch_paths():
3636
3737 Load required modules from the plugin's sources.
3838 """
39- sys .path .insert (0 , os .path .join (os .path .dirname (__file__ ), 'libs' ))
39+ dir_script = os .path .dirname (os .path .abspath (__file__ ))
40+ sys .path .insert (0 , os .path .join (dir_script , 'libs' ))
41+ if sys .platform == 'win32' :
42+ dir_submodule = os .path .abspath (os .path .join (dir_script ,
43+ '..' , 'submodules' ))
44+ sub_modules = os .listdir (dir_submodule )
45+ for module in sub_modules :
46+ module_full_path = os .path .join (dir_submodule , module )
47+ if module_full_path not in sys .path :
48+ sys .path .insert (0 , module_full_path )
You can’t perform that action at this time.
0 commit comments