zoukankan      html  css  js  c++  java
  • python 在初始化运行环境时所有预加载模块

    python 在初始化运行环境时,会预加载一批内建模块到内存。
    所有预加载模块如下:

     1 >>> for item in sys.modules.items():
     2 ...     print item
     3 ...
     4 ('copy_reg', <module 'copy_reg' from '/Users/Kris/git_space/pyv/lib/python2.7/copy_reg.pyc'>)
     5 ('encodings', <module 'encodings' from '/Users/Kris/git_space/pyv/lib/python2.7/encodings/__init__.pyc'>)
     6 ('site', <module 'site' from '/Users/Kris/git_space/pyv/lib/python2.7/site.pyc'>)
     7 ('__builtin__', <module '__builtin__' (built-in)>)
     8 ('__main__', <module '__main__' (built-in)>)
     9 ('encodings.encodings', None)
    10 ('abc', <module 'abc' from '/Users/Kris/git_space/pyv/lib/python2.7/abc.pyc'>)
    11 ('posixpath', <module 'posixpath' from '/Users/Kris/git_space/pyv/lib/python2.7/posixpath.pyc'>)
    12 ('_weakrefset', <module '_weakrefset' from '/Users/Kris/git_space/pyv/lib/python2.7/_weakrefset.pyc'>)
    13 ('errno', <module 'errno' (built-in)>)
    14 ('encodings.codecs', None)
    15 ('_abcoll', <module '_abcoll' from '/Users/Kris/git_space/pyv/lib/python2.7/_abcoll.pyc'>)
    16 ('types', <module 'types' from '/Users/Kris/git_space/pyv/lib/python2.7/types.pyc'>)
    17 ('_codecs', <module '_codecs' (built-in)>)
    18 ('_warnings', <module '_warnings' (built-in)>)
    19 ('genericpath', <module 'genericpath' from '/Users/Kris/git_space/pyv/lib/python2.7/genericpath.pyc'>)
    20 ('stat', <module 'stat' from '/Users/Kris/git_space/pyv/lib/python2.7/stat.pyc'>)
    21 ('zipimport', <module 'zipimport' (built-in)>)
    22 ('encodings.__builtin__', None)
    23 ('warnings', <module 'warnings' from '/Users/Kris/git_space/pyv/lib/python2.7/warnings.pyc'>)
    24 ('UserDict', <module 'UserDict' from '/Users/Kris/git_space/pyv/lib/python2.7/UserDict.pyc'>)
    25 ('encodings.utf_8', <module 'encodings.utf_8' from '/Users/Kris/git_space/pyv/lib/python2.7/encodings/utf_8.pyc'>)
    26 ('sys', <module 'sys' (built-in)>)
    27 ('codecs', <module 'codecs' from '/Users/Kris/git_space/pyv/lib/python2.7/codecs.pyc'>)
    28 ('readline', <module 'readline' from '/Users/Kris/git_space/pyv/lib/python2.7/lib-dynload/readline.so'>)
    29 ('os.path', <module 'posixpath' from '/Users/Kris/git_space/pyv/lib/python2.7/posixpath.pyc'>)
    30 ('signal', <module 'signal' (built-in)>)
    31 ('linecache', <module 'linecache' from '/Users/Kris/git_space/pyv/lib/python2.7/linecache.pyc'>)
    32 ('posix', <module 'posix' (built-in)>)
    33 ('encodings.aliases', <module 'encodings.aliases' from '/Users/Kris/git_space/pyv/lib/python2.7/encodings/aliases.pyc'>)
    34 ('exceptions', <module 'exceptions' (built-in)>)
    35 ('os', <module 'os' from '/Users/Kris/git_space/pyv/lib/python2.7/os.pyc'>)
    36 ('_weakref', <module '_weakref' (built-in)>)
  • 相关阅读:
    WEB测试总结 (架构,设计)精华部分(转)
    javascript的拖放入门
    javascript十个最常用的自定义函数 (转)
    common.css
    c#中DateTime类
    PHP网站开发方案实例
    PHP框架 DooPHP 1.2 发布
    0 WINDOWS系统 + Apache +PHP5 +Zend + MySQL + phpMyAdmin安装方法(视频教程)
    IE8 CSS兼容性记录(转)
    在网站测试中如何做好安全性测试
  • 原文地址:https://www.cnblogs.com/wangfangkui/p/4039929.html
Copyright © 2011-2022 走看看