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 |