eric6/Utilities/ClassBrowsers/pyclbr.py

branch
multi_processing
changeset 7402
bc62b4e1aed4
parent 7360
9190402e4505
child 7628
f904d0eef264
equal deleted inserted replaced
7397:f8d2f6dd6636 7402:bc62b4e1aed4
12 This is module is based on pyclbr found in the Python 2.2.2 distribution. 12 This is module is based on pyclbr found in the Python 2.2.2 distribution.
13 """ 13 """
14 14
15 15
16 import sys 16 import sys
17 import imp
18 import re 17 import re
19 18
20 import Utilities 19 import Utilities
21 import Utilities.ClassBrowsers as ClassBrowsers 20 import Utilities.ClassBrowsers as ClassBrowsers
22 from . import ClbrBaseClasses 21 from . import ClbrBaseClasses
368 f = None 367 f = None
369 if f is None: 368 if f is None:
370 fullpath = path[:] + sys.path[:] 369 fullpath = path[:] + sys.path[:]
371 f, file, (suff, mode, type) = ClassBrowsers.find_module( 370 f, file, (suff, mode, type) = ClassBrowsers.find_module(
372 module, fullpath, isPyFile) 371 module, fullpath, isPyFile)
373 if module.endswith(".py") and type == imp.PKG_DIRECTORY:
374 return dictionary
375 if type == imp.PKG_DIRECTORY:
376 dictionary['__path__'] = [file]
377 _modules[module] = dictionary
378 path = [file] + path
379 f, file, (suff, mode, type) = ClassBrowsers.find_module(
380 '__init__', [file])
381 if f: 372 if f:
382 f.close() 373 f.close()
383 if type not in SUPPORTED_TYPES: 374 if type not in SUPPORTED_TYPES:
384 # not Python source, can't do anything with this module 375 # not Python source, can't do anything with this module
385 _modules[module] = dictionary 376 _modules[module] = dictionary

eric ide

mercurial