Ka-Ping Yee wrote: > > When i import distutils.util, i get: > > >>> sys.modules.keys() > ['os', 'distutils.sys', 'distutils.os', 'exceptions', 'posix', 'distutils.spawn', 're', 'sre_constants', 'distutils.errors', 'string', 'signal', 'sre', 'posixpath', 'sre_parse', '_sre', 'os.path', 'distutils.string', 'readline', 'distutils.util', 'distutils.re', '__main__', 'distutils.dep_util', 'types', 'sys', '__builtin__', 'site', 'UserDict', 'distutils', 'sre_compile', 'copy_reg', 'stat', 'distutils.distutils'] > > What are 'distutils.sys', 'distutils.os', 'distutils.string', > 'distutils.re', 'distutils.distutils' doing in there? These are loaded by site.py for the case where you run Python from the installation directory on Posix systems. > (The > sys.modules dictionary maps all these keys to None.) This basically means that the corresponding modules have already been loaded at top-level. -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4