From 90d4ab65905d39d53445ad2e85e32cd1ed493282 Mon Sep 17 00:00:00 2001 From: deathfantasy Date: Fri, 2 Oct 2015 01:34:50 +0700 Subject: [PATCH] module file path sent to client should only contain "/" as separator --- pupy/pupylib/PupyClient.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pupy/pupylib/PupyClient.py b/pupy/pupylib/PupyClient.py index 6fb91ae6..d0c53df9 100644 --- a/pupy/pupylib/PupyClient.py +++ b/pupy/pupylib/PupyClient.py @@ -102,7 +102,8 @@ class PupyClient(object): For other platforms : loading .so in memory is not supported yet. """ modules_dic={} - start_path=module_name.replace(".",os.sep) + # start path should only use "/" as separator + start_path=module_name.replace(".", "/") package_found=False package_path=None for search_path in self.get_packages_path(): @@ -123,7 +124,7 @@ class PupyClient(object): with open(filepath,'rb') as f: module_code=f.read() cur="" - for rep in start_path.split(os.sep)[:-1]: + for rep in start_path.split("/")[:-1]: if not cur+rep+"/__init__.py" in modules_dic: modules_dic[rep+"/__init__.py"]="" cur+=rep+"/"