Graphics/ImportsDiagram.py

changeset 247
b3da30a52337
parent 96
9624a110667d
child 413
3d82e6eb3516
child 792
a13346916170
equal deleted inserted replaced
246:121d83ba74d5 247:b3da30a52337
39 @keyparam showExternalImports flag indicating to show exports from outside 39 @keyparam showExternalImports flag indicating to show exports from outside
40 the package (boolean) 40 the package (boolean)
41 """ 41 """
42 self.showExternalImports = showExternalImports 42 self.showExternalImports = showExternalImports
43 self.packagePath = Utilities.normabspath(package) 43 self.packagePath = Utilities.normabspath(package)
44 self.package = self.packagePath.replace(os.sep, '.')[1:] 44 self.package = os.path.splitdrive(self.packagePath)[1].replace(os.sep, '.')[1:]
45 hasInit = True 45 hasInit = True
46 ppath = self.packagePath 46 ppath = self.packagePath
47 while hasInit: 47 while hasInit:
48 ppath = os.path.dirname(ppath) 48 ppath = os.path.dirname(ppath)
49 hasInit = len(glob.glob(os.path.join(ppath, '__init__.*'))) > 0 49 hasInit = len(glob.glob(os.path.join(ppath, '__init__.*'))) > 0

eric ide

mercurial