内建函数和异常模块:
__builtin__:定义内置函数
include:len,int,range,apply,dir,type,callable,isinstance,issubclass,eval,compile,open,raw_input,print,__import__,reload,vers,execfile
exceptions:定义所有内建异常
include:Exception,ImportError,IOError,OSError,WindowsError,NameError,AttributeError,SyntaxError,IndentationError,TypeError,IndexError,KeyError,RuntimeError,SystemError,MemoryError,FloatingPointError,ValueError,OverflowError,LookupError,AssertionError,SystemExit,StandardError,keyboardInterrupt,EnvironmentError,unboundLocalError,TabError
操作系统接口模块:
os:提供文件和进程处理功能
os.path:提供平台独立的文件名处理(分拆目录名,文件名,后缀等)
time/datetime:时间日期处理模块
类型支持模块:
string:提供常见字符串处理
math:提供数学计算操作和常量(pi,e)
cmath:为复数提供和math一样的功能
正则表达式模块:
re:提供正则表达式支持
语言支持模块:
sys:访问解释器相关参数(模块搜索路径,解释器版本号)
include:stdout.wirte,platform,version
operator:提供了和内建操作符作用相同的函数
copy:允许你复制对象
gc:提供对垃圾收集的相关控制功能