模块

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

操作系统 os

import os
os.getcwd()
'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练'

文件通配符 glob

glob模块用来查找文件目录和文件,并将搜索的到的结果返回到一个列表中.

  • 通配符
    • *代表0个或多个字符

    • ?代表一个字符

    • []匹配指定范围内的字符,如[0-9]匹配数字

        glob.glob(pathname,*,recursive=False) #返回该path下所有满足条件的文件path的列表,以点号.开始的文件不会被匹配
        #如果recursive为真,则模式“ **”将匹配任何文件和零个或多个目录、子目录和目录的符号链接
        glob.iglob(path)#返回该path下所有满足条件的文件path的迭代器
        glob.escape(path)#不会解释特殊字符(通配符),返回一个用中括号将特殊字符括起来的路径,这样特殊字符就不再特殊了。
      
## 创建文件夹
if not os.path.exists('glob'):
    os.makedirs('glob')
## 创建文件
for i in range(5):
    with open('./glob/t'+str(i)+'.txt','w') as f:
        f.write('这是第{}个txt文本'.format(i))    
    with open('./glob/python'+str(i)+'.py','wb') as p:
        p.write(b'hello,world')
    with open('./glob/图片'+str(i)+'.jpg','wb') as j:
        j.write(b'jpg')
    with open('./glob/特殊[字符'+str(i)+'.txt','w') as t:
        t.write('文件名含特殊字符如何查找')
10

11

3

12

10

11

3

12

10

11

3

12

10

11

3

12

10

11

3

12
import glob
glob.glob(os.getcwd()+'\\glob\\*.py')
['C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python0.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python1.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python2.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python3.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python4.py']
glob.glob(os.getcwd()+'\\glob\\.*')#点号开头的文件不会被匹配
[]
glob.glob(os.getcwd()+'\\**\\*',recursive=False)
['C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python0.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python1.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python2.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python3.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python4.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t0.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t1.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t2.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t3.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t4.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片0.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片1.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片2.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片3.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片4.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符0.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符1.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符2.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符3.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符4.txt']
glob.glob(os.getcwd()+'\\**\\*',recursive=True)
['C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\关键字.ipynb',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\内置函数.ipynb',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\内置模块.ipynb',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\函数.ipynb',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\字符串.ipynb',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\常用模块.ipynb',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\序列.ipynb',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\文件.ipynb',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\面向对象.ipynb',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python0.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python1.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python2.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python3.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python4.py',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t0.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t1.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t2.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t3.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\t4.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片0.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片1.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片2.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片3.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\图片4.jpg',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符0.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符1.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符2.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符3.txt',
 'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[字符4.txt']
##生成器
a=glob.iglob(os.getcwd()+'\\glob\\*.py')
next(a)
next(a)
'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python0.py'

'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\python1.py'
##跳过通配符
glob.escape(os.getcwd()+'\\glob\\*.py')
glob.escape(os.getcwd()+'\\glob\\特殊[字符0.txt')
'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\[*].py'

'C:\\Users\\WangChengLong\\Desktop\\python基础知识训练\\glob\\特殊[[]字符0.txt'

命令行参数以及错误输出重定向和程序终止 sys

“sys”即“system”,“系统”之意。该模块提供了一些接口,用于访问 Python 解释器自身使用和维护的变量,同时模块中还提供了一部分函数,可以与解释器进行比较深度的交互。

import sys

sys.argv

可以获取在命令行运行的脚本名称,如python.py。以及后面跟着输入的变量,组成一个列表。这样我们在命令行运行脚本的时候,将更加灵活,可以交互式的输入变量。

比如现在有一个脚本add.py

import sys
if __name__=="__main__":
    name_of_jiaoben,arg1,arg2=sys.argv
    print(arg1+arg2)

然后我们在命令行输入:

$python add.py 1,2 

sys.argv将会得到 [add.py,1,1],然后输出结果

sys.platform

##查看系统
sys.platform
'win32'

sys.executable

该属性是一个字符串,在正常情况下,其值是当前运行的 Python 解释器对应的可执行程序所在的绝对路径。

sys.executable
'D:\\Anaconda\\python.exe'

sys.modules

该属性是一个字典,包含的是各种已加载的模块的模块名到模块具体位置的映射。

通过手动修改这个字典,可以重新加载某些模块;但要注意,切记不要大意删除了一些基本的项,否则可能会导致 Python 整个儿无法运行。

If you want to iterate over this global dictionary always use sys.modules.copy() or tuple(sys.modules) to avoid exceptions as its size may change during iteration as a side effect of code or activity in other threads.

sys.modules
{'sys': <module 'sys' (built-in)>,
 'builtins': <module 'builtins' (built-in)>,
 '_frozen_importlib': <module 'importlib._bootstrap' (frozen)>,
 '_imp': <module '_imp' (built-in)>,
 '_thread': <module '_thread' (built-in)>,
 '_warnings': <module '_warnings' (built-in)>,
 '_weakref': <module '_weakref' (built-in)>,
 'zipimport': <module 'zipimport' (built-in)>,
 '_frozen_importlib_external': <module 'importlib._bootstrap_external' (frozen)>,
 '_io': <module 'io' (built-in)>,
 'marshal': <module 'marshal' (built-in)>,
 'nt': <module 'nt' (built-in)>,
 'winreg': <module 'winreg' (built-in)>,
 'encodings': <module 'encodings' from 'D:\\Anaconda\\lib\\encodings\\__init__.py'>,
 'codecs': <module 'codecs' from 'D:\\Anaconda\\lib\\codecs.py'>,
 '_codecs': <module '_codecs' (built-in)>,
 'encodings.aliases': <module 'encodings.aliases' from 'D:\\Anaconda\\lib\\encodings\\aliases.py'>,
 'encodings.utf_8': <module 'encodings.utf_8' from 'D:\\Anaconda\\lib\\encodings\\utf_8.py'>,
 '_signal': <module '_signal' (built-in)>,
 '__main__': <module '__main__'>,
 'encodings.latin_1': <module 'encodings.latin_1' from 'D:\\Anaconda\\lib\\encodings\\latin_1.py'>,
 'io': <module 'io' from 'D:\\Anaconda\\lib\\io.py'>,
 'abc': <module 'abc' from 'D:\\Anaconda\\lib\\abc.py'>,
 '_abc': <module '_abc' (built-in)>,
 '_bootlocale': <module '_bootlocale' from 'D:\\Anaconda\\lib\\_bootlocale.py'>,
 '_locale': <module '_locale' (built-in)>,
 'encodings.gbk': <module 'encodings.gbk' from 'D:\\Anaconda\\lib\\encodings\\gbk.py'>,
 '_codecs_cn': <module '_codecs_cn' (built-in)>,
 '_multibytecodec': <module '_multibytecodec' (built-in)>,
 'site': <module 'site' from 'D:\\Anaconda\\lib\\site.py'>,
 'os': <module 'os' from 'D:\\Anaconda\\lib\\os.py'>,
 'stat': <module 'stat' from 'D:\\Anaconda\\lib\\stat.py'>,
 '_stat': <module '_stat' (built-in)>,
 'ntpath': <module 'ntpath' from 'D:\\Anaconda\\lib\\ntpath.py'>,
 'genericpath': <module 'genericpath' from 'D:\\Anaconda\\lib\\genericpath.py'>,
 'os.path': <module 'ntpath' from 'D:\\Anaconda\\lib\\ntpath.py'>,
 '_collections_abc': <module '_collections_abc' from 'D:\\Anaconda\\lib\\_collections_abc.py'>,
 '_sitebuiltins': <module '_sitebuiltins' from 'D:\\Anaconda\\lib\\_sitebuiltins.py'>,
 'types': <module 'types' from 'D:\\Anaconda\\lib\\types.py'>,
 'importlib': <module 'importlib' from 'D:\\Anaconda\\lib\\importlib\\__init__.py'>,
 'importlib._bootstrap': <module 'importlib._bootstrap' (frozen)>,
 'importlib._bootstrap_external': <module 'importlib._bootstrap_external' (frozen)>,
 'warnings': <module 'warnings' from 'D:\\Anaconda\\lib\\warnings.py'>,
 'importlib.util': <module 'importlib.util' from 'D:\\Anaconda\\lib\\importlib\\util.py'>,
 'importlib.abc': <module 'importlib.abc' from 'D:\\Anaconda\\lib\\importlib\\abc.py'>,
 'importlib.machinery': <module 'importlib.machinery' from 'D:\\Anaconda\\lib\\importlib\\machinery.py'>,
 'contextlib': <module 'contextlib' from 'D:\\Anaconda\\lib\\contextlib.py'>,
 'collections': <module 'collections' from 'D:\\Anaconda\\lib\\collections\\__init__.py'>,
 'operator': <module 'operator' from 'D:\\Anaconda\\lib\\operator.py'>,
 '_operator': <module '_operator' (built-in)>,
 'keyword': <module 'keyword' from 'D:\\Anaconda\\lib\\keyword.py'>,
 'heapq': <module 'heapq' from 'D:\\Anaconda\\lib\\heapq.py'>,
 '_heapq': <module '_heapq' (built-in)>,
 'itertools': <module 'itertools' (built-in)>,
 'reprlib': <module 'reprlib' from 'D:\\Anaconda\\lib\\reprlib.py'>,
 '_collections': <module '_collections' (built-in)>,
 'functools': <module 'functools' from 'D:\\Anaconda\\lib\\functools.py'>,
 '_functools': <module '_functools' (built-in)>,
 'mpl_toolkits': <module 'mpl_toolkits' (namespace)>,
 'sphinxcontrib': <module 'sphinxcontrib' from 'D:\\Anaconda\\lib\\site-packages\\sphinxcontrib\\__init__.py'>,
 'zope': <module 'zope' from 'D:\\Anaconda\\lib\\site-packages\\zope\\__init__.py'>,
 'runpy': <module 'runpy' from 'D:\\Anaconda\\lib\\runpy.py'>,
 'pkgutil': <module 'pkgutil' from 'D:\\Anaconda\\lib\\pkgutil.py'>,
 'weakref': <module 'weakref' from 'D:\\Anaconda\\lib\\weakref.py'>,
 '_weakrefset': <module '_weakrefset' from 'D:\\Anaconda\\lib\\_weakrefset.py'>,
 'ipykernel': <module 'ipykernel' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\__init__.py'>,
 'ipykernel._version': <module 'ipykernel._version' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\_version.py'>,
 'ipykernel.connect': <module 'ipykernel.connect' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\connect.py'>,
 '__future__': <module '__future__' from 'D:\\Anaconda\\lib\\__future__.py'>,
 'json': <module 'json' from 'D:\\Anaconda\\lib\\json\\__init__.py'>,
 'json.decoder': <module 'json.decoder' from 'D:\\Anaconda\\lib\\json\\decoder.py'>,
 're': <module 're' from 'D:\\Anaconda\\lib\\re.py'>,
 'enum': <module 'enum' from 'D:\\Anaconda\\lib\\enum.py'>,
 'sre_compile': <module 'sre_compile' from 'D:\\Anaconda\\lib\\sre_compile.py'>,
 '_sre': <module '_sre' (built-in)>,
 'sre_parse': <module 'sre_parse' from 'D:\\Anaconda\\lib\\sre_parse.py'>,
 'sre_constants': <module 'sre_constants' from 'D:\\Anaconda\\lib\\sre_constants.py'>,
 'copyreg': <module 'copyreg' from 'D:\\Anaconda\\lib\\copyreg.py'>,
 'json.scanner': <module 'json.scanner' from 'D:\\Anaconda\\lib\\json\\scanner.py'>,
 '_json': <module '_json' (built-in)>,
 'json.encoder': <module 'json.encoder' from 'D:\\Anaconda\\lib\\json\\encoder.py'>,
 'subprocess': <module 'subprocess' from 'D:\\Anaconda\\lib\\subprocess.py'>,
 'time': <module 'time' (built-in)>,
 'signal': <module 'signal' from 'D:\\Anaconda\\lib\\signal.py'>,
 'errno': <module 'errno' (built-in)>,
 'threading': <module 'threading' from 'D:\\Anaconda\\lib\\threading.py'>,
 'traceback': <module 'traceback' from 'D:\\Anaconda\\lib\\traceback.py'>,
 'linecache': <module 'linecache' from 'D:\\Anaconda\\lib\\linecache.py'>,
 'tokenize': <module 'tokenize' from 'D:\\Anaconda\\lib\\tokenize.py'>,
 'token': <module 'token' from 'D:\\Anaconda\\lib\\token.py'>,
 'msvcrt': <module 'msvcrt' (built-in)>,
 '_winapi': <module '_winapi' (built-in)>,
 'IPython': <module 'IPython' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\__init__.py'>,
 'IPython.core': <module 'IPython.core' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\__init__.py'>,
 'IPython.core.getipython': <module 'IPython.core.getipython' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\getipython.py'>,
 'IPython.core.release': <module 'IPython.core.release' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\release.py'>,
 'IPython.core.application': <module 'IPython.core.application' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\application.py'>,
 'atexit': <module 'atexit' (built-in)>,
 'copy': <module 'copy' from 'D:\\Anaconda\\lib\\copy.py'>,
 'glob': <module 'glob' from 'D:\\Anaconda\\lib\\glob.py'>,
 'fnmatch': <module 'fnmatch' from 'D:\\Anaconda\\lib\\fnmatch.py'>,
 'posixpath': <module 'posixpath' from 'D:\\Anaconda\\lib\\posixpath.py'>,
 'logging': <module 'logging' from 'D:\\Anaconda\\lib\\logging\\__init__.py'>,
 'collections.abc': <module 'collections.abc' from 'D:\\Anaconda\\lib\\collections\\abc.py'>,
 'string': <module 'string' from 'D:\\Anaconda\\lib\\string.py'>,
 '_string': <module '_string' (built-in)>,
 'shutil': <module 'shutil' from 'D:\\Anaconda\\lib\\shutil.py'>,
 'zlib': <module 'zlib' (built-in)>,
 'bz2': <module 'bz2' from 'D:\\Anaconda\\lib\\bz2.py'>,
 '_compression': <module '_compression' from 'D:\\Anaconda\\lib\\_compression.py'>,
 '_bz2': <module '_bz2' from 'D:\\Anaconda\\DLLs\\_bz2.pyd'>,
 'lzma': <module 'lzma' from 'D:\\Anaconda\\lib\\lzma.py'>,
 '_lzma': <module '_lzma' from 'D:\\Anaconda\\DLLs\\_lzma.pyd'>,
 'traitlets': <module 'traitlets' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\__init__.py'>,
 'traitlets.traitlets': <module 'traitlets.traitlets' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\traitlets.py'>,
 'inspect': <module 'inspect' from 'D:\\Anaconda\\lib\\inspect.py'>,
 'dis': <module 'dis' from 'D:\\Anaconda\\lib\\dis.py'>,
 'opcode': <module 'opcode' from 'D:\\Anaconda\\lib\\opcode.py'>,
 '_opcode': <module '_opcode' (built-in)>,
 'six': <module 'six' from 'D:\\Anaconda\\lib\\site-packages\\six.py'>,
 'struct': <module 'struct' from 'D:\\Anaconda\\lib\\struct.py'>,
 '_struct': <module '_struct' (built-in)>,
 'traitlets.utils': <module 'traitlets.utils' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\utils\\__init__.py'>,
 'traitlets.utils.getargspec': <module 'traitlets.utils.getargspec' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\utils\\getargspec.py'>,
 'traitlets.utils.importstring': <module 'traitlets.utils.importstring' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\utils\\importstring.py'>,
 'ipython_genutils': <module 'ipython_genutils' from 'D:\\Anaconda\\lib\\site-packages\\ipython_genutils\\__init__.py'>,
 'ipython_genutils._version': <module 'ipython_genutils._version' from 'D:\\Anaconda\\lib\\site-packages\\ipython_genutils\\_version.py'>,
 'ipython_genutils.py3compat': <module 'ipython_genutils.py3compat' from 'D:\\Anaconda\\lib\\site-packages\\ipython_genutils\\py3compat.py'>,
 'ipython_genutils.encoding': <module 'ipython_genutils.encoding' from 'D:\\Anaconda\\lib\\site-packages\\ipython_genutils\\encoding.py'>,
 'locale': <module 'locale' from 'D:\\Anaconda\\lib\\locale.py'>,
 'platform': <module 'platform' from 'D:\\Anaconda\\lib\\platform.py'>,
 'traitlets.utils.sentinel': <module 'traitlets.utils.sentinel' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\utils\\sentinel.py'>,
 'traitlets.utils.bunch': <module 'traitlets.utils.bunch' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\utils\\bunch.py'>,
 'traitlets._version': <module 'traitlets._version' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\_version.py'>,
 'traitlets.config': <module 'traitlets.config' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\config\\__init__.py'>,
 'traitlets.config.application': <module 'traitlets.config.application' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\config\\application.py'>,
 'decorator': <module 'decorator' from 'D:\\Anaconda\\lib\\site-packages\\decorator.py'>,
 'traitlets.config.configurable': <module 'traitlets.config.configurable' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\config\\configurable.py'>,
 'traitlets.config.loader': <module 'traitlets.config.loader' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\config\\loader.py'>,
 'argparse': <module 'argparse' from 'D:\\Anaconda\\lib\\argparse.py'>,
 'gettext': <module 'gettext' from 'D:\\Anaconda\\lib\\gettext.py'>,
 'ast': <module 'ast' from 'D:\\Anaconda\\lib\\ast.py'>,
 '_ast': <module '_ast' (built-in)>,
 'ipython_genutils.path': <module 'ipython_genutils.path' from 'D:\\Anaconda\\lib\\site-packages\\ipython_genutils\\path.py'>,
 'random': <module 'random' from 'D:\\Anaconda\\lib\\random.py'>,
 'math': <module 'math' (built-in)>,
 'hashlib': <module 'hashlib' from 'D:\\Anaconda\\lib\\hashlib.py'>,
 '_hashlib': <module '_hashlib' from 'D:\\Anaconda\\DLLs\\_hashlib.pyd'>,
 '_blake2': <module '_blake2' (built-in)>,
 '_sha3': <module '_sha3' (built-in)>,
 'bisect': <module 'bisect' from 'D:\\Anaconda\\lib\\bisect.py'>,
 '_bisect': <module '_bisect' (built-in)>,
 '_random': <module '_random' (built-in)>,
 'ipython_genutils.text': <module 'ipython_genutils.text' from 'D:\\Anaconda\\lib\\site-packages\\ipython_genutils\\text.py'>,
 'textwrap': <module 'textwrap' from 'D:\\Anaconda\\lib\\textwrap.py'>,
 'ipython_genutils.importstring': <module 'ipython_genutils.importstring' from 'D:\\Anaconda\\lib\\site-packages\\ipython_genutils\\importstring.py'>,
 'IPython.core.crashhandler': <module 'IPython.core.crashhandler' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\crashhandler.py'>,
 'pprint': <module 'pprint' from 'D:\\Anaconda\\lib\\pprint.py'>,
 'IPython.core.ultratb': <module 'IPython.core.ultratb' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\ultratb.py'>,
 'pydoc': <module 'pydoc' from 'D:\\Anaconda\\lib\\pydoc.py'>,
 'urllib': <module 'urllib' from 'D:\\Anaconda\\lib\\urllib\\__init__.py'>,
 'urllib.parse': <module 'urllib.parse' from 'D:\\Anaconda\\lib\\urllib\\parse.py'>,
 'IPython.core.debugger': <module 'IPython.core.debugger' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\debugger.py'>,
 'bdb': <module 'bdb' from 'D:\\Anaconda\\lib\\bdb.py'>,
 'IPython.utils': <module 'IPython.utils' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\__init__.py'>,
 'IPython.utils.PyColorize': <module 'IPython.utils.PyColorize' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\PyColorize.py'>,
 'IPython.utils.coloransi': <module 'IPython.utils.coloransi' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\coloransi.py'>,
 'IPython.utils.ipstruct': <module 'IPython.utils.ipstruct' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\ipstruct.py'>,
 'IPython.utils.colorable': <module 'IPython.utils.colorable' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\colorable.py'>,
 'pygments': <module 'pygments' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\__init__.py'>,
 'IPython.utils.py3compat': <module 'IPython.utils.py3compat' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\py3compat.py'>,
 'IPython.utils.encoding': <module 'IPython.utils.encoding' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\encoding.py'>,
 'IPython.core.excolors': <module 'IPython.core.excolors' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\excolors.py'>,
 'IPython.testing': <module 'IPython.testing' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\testing\\__init__.py'>,
 'IPython.testing.skipdoctest': <module 'IPython.testing.skipdoctest' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\testing\\skipdoctest.py'>,
 'pdb': <module 'pdb' from 'D:\\Anaconda\\lib\\pdb.py'>,
 'cmd': <module 'cmd' from 'D:\\Anaconda\\lib\\cmd.py'>,
 'code': <module 'code' from 'D:\\Anaconda\\lib\\code.py'>,
 'codeop': <module 'codeop' from 'D:\\Anaconda\\lib\\codeop.py'>,
 'IPython.core.display_trap': <module 'IPython.core.display_trap' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\display_trap.py'>,
 'IPython.utils.path': <module 'IPython.utils.path' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\path.py'>,
 'IPython.utils.process': <module 'IPython.utils.process' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\process.py'>,
 'IPython.utils._process_win32': <module 'IPython.utils._process_win32' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\_process_win32.py'>,
 'ctypes': <module 'ctypes' from 'D:\\Anaconda\\lib\\ctypes\\__init__.py'>,
 '_ctypes': <module '_ctypes' from 'D:\\Anaconda\\DLLs\\_ctypes.pyd'>,
 'ctypes._endian': <module 'ctypes._endian' from 'D:\\Anaconda\\lib\\ctypes\\_endian.py'>,
 'ctypes.wintypes': <module 'ctypes.wintypes' from 'D:\\Anaconda\\lib\\ctypes\\wintypes.py'>,
 'IPython.utils._process_common': <module 'IPython.utils._process_common' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\_process_common.py'>,
 'shlex': <module 'shlex' from 'D:\\Anaconda\\lib\\shlex.py'>,
 'IPython.utils.decorators': <module 'IPython.utils.decorators' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\decorators.py'>,
 'IPython.utils.data': <module 'IPython.utils.data' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\data.py'>,
 'IPython.utils.terminal': <module 'IPython.utils.terminal' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\terminal.py'>,
 'IPython.utils.sysinfo': <module 'IPython.utils.sysinfo' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\sysinfo.py'>,
 'IPython.utils._sysinfo': <module 'IPython.utils._sysinfo' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\_sysinfo.py'>,
 'IPython.core.profiledir': <module 'IPython.core.profiledir' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\profiledir.py'>,
 'IPython.paths': <module 'IPython.paths' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\paths.py'>,
 'tempfile': <module 'tempfile' from 'D:\\Anaconda\\lib\\tempfile.py'>,
 'IPython.utils.importstring': <module 'IPython.utils.importstring' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\importstring.py'>,
 'IPython.terminal': <module 'IPython.terminal' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\__init__.py'>,
 'IPython.terminal.embed': <module 'IPython.terminal.embed' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\embed.py'>,
 'IPython.core.compilerop': <module 'IPython.core.compilerop' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\compilerop.py'>,
 'IPython.core.magic_arguments': <module 'IPython.core.magic_arguments' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magic_arguments.py'>,
 'IPython.core.error': <module 'IPython.core.error' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\error.py'>,
 'IPython.utils.text': <module 'IPython.utils.text' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\text.py'>,
 'pathlib': <module 'pathlib' from 'D:\\Anaconda\\lib\\pathlib.py'>,
 'IPython.core.magic': <module 'IPython.core.magic' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magic.py'>,
 'getopt': <module 'getopt' from 'D:\\Anaconda\\lib\\getopt.py'>,
 'IPython.core.oinspect': <module 'IPython.core.oinspect' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\oinspect.py'>,
 'IPython.core.page': <module 'IPython.core.page' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\page.py'>,
 'IPython.core.display': <module 'IPython.core.display' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\display.py'>,
 'binascii': <module 'binascii' (built-in)>,
 'mimetypes': <module 'mimetypes' from 'D:\\Anaconda\\lib\\mimetypes.py'>,
 'IPython.lib': <module 'IPython.lib' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\lib\\__init__.py'>,
 'IPython.lib.security': <module 'IPython.lib.security' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\lib\\security.py'>,
 'getpass': <module 'getpass' from 'D:\\Anaconda\\lib\\getpass.py'>,
 'IPython.lib.pretty': <module 'IPython.lib.pretty' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\lib\\pretty.py'>,
 'datetime': <module 'datetime' from 'D:\\Anaconda\\lib\\datetime.py'>,
 '_datetime': <module '_datetime' (built-in)>,
 'IPython.utils.openpy': <module 'IPython.utils.openpy' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\openpy.py'>,
 'IPython.utils.dir2': <module 'IPython.utils.dir2' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\dir2.py'>,
 'IPython.utils.wildcard': <module 'IPython.utils.wildcard' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\wildcard.py'>,
 'pygments.lexers': <module 'pygments.lexers' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\lexers\\__init__.py'>,
 'pygments.lexers._mapping': <module 'pygments.lexers._mapping' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\lexers\\_mapping.py'>,
 'pygments.modeline': <module 'pygments.modeline' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\modeline.py'>,
 'pygments.plugin': <module 'pygments.plugin' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\plugin.py'>,
 'pygments.util': <module 'pygments.util' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\util.py'>,
 'pygments.lexers.python': <module 'pygments.lexers.python' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\lexers\\python.py'>,
 'pygments.lexer': <module 'pygments.lexer' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\lexer.py'>,
 'pygments.filter': <module 'pygments.filter' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\filter.py'>,
 'pygments.filters': <module 'pygments.filters' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\filters\\__init__.py'>,
 'pygments.token': <module 'pygments.token' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\token.py'>,
 'pygments.regexopt': <module 'pygments.regexopt' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\regexopt.py'>,
 'pygments.unistring': <module 'pygments.unistring' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\unistring.py'>,
 'pygments.formatters': <module 'pygments.formatters' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\formatters\\__init__.py'>,
 'pygments.formatters._mapping': <module 'pygments.formatters._mapping' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\formatters\\_mapping.py'>,
 'pygments.formatters.html': <module 'pygments.formatters.html' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\formatters\\html.py'>,
 'pygments.formatter': <module 'pygments.formatter' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\formatter.py'>,
 'pygments.styles': <module 'pygments.styles' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\styles\\__init__.py'>,
 'IPython.core.inputtransformer2': <module 'IPython.core.inputtransformer2' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\inputtransformer2.py'>,
 'typing': <module 'typing' from 'D:\\Anaconda\\lib\\typing.py'>,
 'typing.io': typing.io,
 'typing.re': typing.re,
 'IPython.core.interactiveshell': <module 'IPython.core.interactiveshell' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\interactiveshell.py'>,
 'asyncio': <module 'asyncio' from 'D:\\Anaconda\\lib\\asyncio\\__init__.py'>,
 'asyncio.base_events': <module 'asyncio.base_events' from 'D:\\Anaconda\\lib\\asyncio\\base_events.py'>,
 'concurrent': <module 'concurrent' from 'D:\\Anaconda\\lib\\concurrent\\__init__.py'>,
 'concurrent.futures': <module 'concurrent.futures' from 'D:\\Anaconda\\lib\\concurrent\\futures\\__init__.py'>,
 'concurrent.futures._base': <module 'concurrent.futures._base' from 'D:\\Anaconda\\lib\\concurrent\\futures\\_base.py'>,
 'socket': <module 'socket' from 'D:\\Anaconda\\lib\\socket.py'>,
 '_socket': <module '_socket' from 'D:\\Anaconda\\DLLs\\_socket.pyd'>,
 'selectors': <module 'selectors' from 'D:\\Anaconda\\lib\\selectors.py'>,
 'select': <module 'select' from 'D:\\Anaconda\\DLLs\\select.pyd'>,
 'ssl': <module 'ssl' from 'D:\\Anaconda\\lib\\ssl.py'>,
 '_ssl': <module '_ssl' from 'D:\\Anaconda\\DLLs\\_ssl.pyd'>,
 'base64': <module 'base64' from 'D:\\Anaconda\\lib\\base64.py'>,
 'asyncio.constants': <module 'asyncio.constants' from 'D:\\Anaconda\\lib\\asyncio\\constants.py'>,
 'asyncio.coroutines': <module 'asyncio.coroutines' from 'D:\\Anaconda\\lib\\asyncio\\coroutines.py'>,
 'asyncio.base_futures': <module 'asyncio.base_futures' from 'D:\\Anaconda\\lib\\asyncio\\base_futures.py'>,
 'asyncio.format_helpers': <module 'asyncio.format_helpers' from 'D:\\Anaconda\\lib\\asyncio\\format_helpers.py'>,
 'asyncio.log': <module 'asyncio.log' from 'D:\\Anaconda\\lib\\asyncio\\log.py'>,
 'asyncio.events': <module 'asyncio.events' from 'D:\\Anaconda\\lib\\asyncio\\events.py'>,
 'contextvars': <module 'contextvars' from 'D:\\Anaconda\\lib\\contextvars.py'>,
 '_contextvars': <module '_contextvars' (built-in)>,
 'asyncio.base_tasks': <module 'asyncio.base_tasks' from 'D:\\Anaconda\\lib\\asyncio\\base_tasks.py'>,
 '_asyncio': <module '_asyncio' from 'D:\\Anaconda\\DLLs\\_asyncio.pyd'>,
 'asyncio.futures': <module 'asyncio.futures' from 'D:\\Anaconda\\lib\\asyncio\\futures.py'>,
 'asyncio.protocols': <module 'asyncio.protocols' from 'D:\\Anaconda\\lib\\asyncio\\protocols.py'>,
 'asyncio.sslproto': <module 'asyncio.sslproto' from 'D:\\Anaconda\\lib\\asyncio\\sslproto.py'>,
 'asyncio.transports': <module 'asyncio.transports' from 'D:\\Anaconda\\lib\\asyncio\\transports.py'>,
 'asyncio.tasks': <module 'asyncio.tasks' from 'D:\\Anaconda\\lib\\asyncio\\tasks.py'>,
 'asyncio.locks': <module 'asyncio.locks' from 'D:\\Anaconda\\lib\\asyncio\\locks.py'>,
 'asyncio.runners': <module 'asyncio.runners' from 'D:\\Anaconda\\lib\\asyncio\\runners.py'>,
 'asyncio.queues': <module 'asyncio.queues' from 'D:\\Anaconda\\lib\\asyncio\\queues.py'>,
 'asyncio.streams': <module 'asyncio.streams' from 'D:\\Anaconda\\lib\\asyncio\\streams.py'>,
 'asyncio.subprocess': <module 'asyncio.subprocess' from 'D:\\Anaconda\\lib\\asyncio\\subprocess.py'>,
 'asyncio.windows_events': <module 'asyncio.windows_events' from 'D:\\Anaconda\\lib\\asyncio\\windows_events.py'>,
 '_overlapped': <module '_overlapped' from 'D:\\Anaconda\\DLLs\\_overlapped.pyd'>,
 'asyncio.base_subprocess': <module 'asyncio.base_subprocess' from 'D:\\Anaconda\\lib\\asyncio\\base_subprocess.py'>,
 'asyncio.proactor_events': <module 'asyncio.proactor_events' from 'D:\\Anaconda\\lib\\asyncio\\proactor_events.py'>,
 'asyncio.selector_events': <module 'asyncio.selector_events' from 'D:\\Anaconda\\lib\\asyncio\\selector_events.py'>,
 'asyncio.windows_utils': <module 'asyncio.windows_utils' from 'D:\\Anaconda\\lib\\asyncio\\windows_utils.py'>,
 'pickleshare': <module 'pickleshare' from 'D:\\Anaconda\\lib\\site-packages\\pickleshare.py'>,
 'pickle': <module 'pickle' from 'D:\\Anaconda\\lib\\pickle.py'>,
 '_compat_pickle': <module '_compat_pickle' from 'D:\\Anaconda\\lib\\_compat_pickle.py'>,
 '_pickle': <module '_pickle' (built-in)>,
 'IPython.core.prefilter': <module 'IPython.core.prefilter' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\prefilter.py'>,
 'IPython.core.autocall': <module 'IPython.core.autocall' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\autocall.py'>,
 'IPython.core.macro': <module 'IPython.core.macro' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\macro.py'>,
 'IPython.core.splitinput': <module 'IPython.core.splitinput' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\splitinput.py'>,
 'IPython.core.alias': <module 'IPython.core.alias' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\alias.py'>,
 'IPython.core.builtin_trap': <module 'IPython.core.builtin_trap' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\builtin_trap.py'>,
 'IPython.core.events': <module 'IPython.core.events' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\events.py'>,
 'backcall': <module 'backcall' from 'D:\\Anaconda\\lib\\site-packages\\backcall\\__init__.py'>,
 'backcall.backcall': <module 'backcall.backcall' from 'D:\\Anaconda\\lib\\site-packages\\backcall\\backcall.py'>,
 'IPython.core.displayhook': <module 'IPython.core.displayhook' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\displayhook.py'>,
 'IPython.core.displaypub': <module 'IPython.core.displaypub' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\displaypub.py'>,
 'IPython.core.extensions': <module 'IPython.core.extensions' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\extensions.py'>,
 'IPython.core.formatters': <module 'IPython.core.formatters' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\formatters.py'>,
 'IPython.utils.sentinel': <module 'IPython.utils.sentinel' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\sentinel.py'>,
 'IPython.core.history': <module 'IPython.core.history' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\history.py'>,
 'sqlite3': <module 'sqlite3' from 'D:\\Anaconda\\lib\\sqlite3\\__init__.py'>,
 'sqlite3.dbapi2': <module 'sqlite3.dbapi2' from 'D:\\Anaconda\\lib\\sqlite3\\dbapi2.py'>,
 '_sqlite3': <module '_sqlite3' from 'D:\\Anaconda\\DLLs\\_sqlite3.pyd'>,
 'IPython.core.logger': <module 'IPython.core.logger' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\logger.py'>,
 'IPython.core.payload': <module 'IPython.core.payload' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\payload.py'>,
 'IPython.core.usage': <module 'IPython.core.usage' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\usage.py'>,
 'IPython.display': <module 'IPython.display' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\display.py'>,
 'IPython.lib.display': <module 'IPython.lib.display' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\lib\\display.py'>,
 'html': <module 'html' from 'D:\\Anaconda\\lib\\html\\__init__.py'>,
 'html.entities': <module 'html.entities' from 'D:\\Anaconda\\lib\\html\\entities.py'>,
 'IPython.utils.io': <module 'IPython.utils.io' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\io.py'>,
 'IPython.utils.capture': <module 'IPython.utils.capture' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\capture.py'>,
 'IPython.utils.strdispatch': <module 'IPython.utils.strdispatch' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\strdispatch.py'>,
 'IPython.core.hooks': <module 'IPython.core.hooks' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\hooks.py'>,
 'IPython.utils.syspathcontext': <module 'IPython.utils.syspathcontext' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\syspathcontext.py'>,
 'IPython.utils.tempdir': <module 'IPython.utils.tempdir' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\tempdir.py'>,
 'IPython.utils.contexts': <module 'IPython.utils.contexts' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\contexts.py'>,
 'IPython.core.async_helpers': <module 'IPython.core.async_helpers' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\async_helpers.py'>,
 'IPython.terminal.interactiveshell': <module 'IPython.terminal.interactiveshell' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\interactiveshell.py'>,
 'prompt_toolkit': <module 'prompt_toolkit' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\__init__.py'>,
 'prompt_toolkit.application': <module 'prompt_toolkit.application' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\application\\__init__.py'>,
 'prompt_toolkit.application.application': <module 'prompt_toolkit.application.application' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\application\\application.py'>,
 'prompt_toolkit.buffer': <module 'prompt_toolkit.buffer' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\buffer.py'>,
 'six.moves': <module 'six.moves' (<six._SixMetaPathImporter object at 0x000001557F22DEC8>)>,
 'prompt_toolkit.application.current': <module 'prompt_toolkit.application.current' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\application\\current.py'>,
 'prompt_toolkit.eventloop': <module 'prompt_toolkit.eventloop' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\eventloop\\__init__.py'>,
 'prompt_toolkit.eventloop.async_generator': <module 'prompt_toolkit.eventloop.async_generator' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\eventloop\\async_generator.py'>,
 'queue': <module 'queue' from 'D:\\Anaconda\\lib\\queue.py'>,
 '_queue': <module '_queue' from 'D:\\Anaconda\\DLLs\\_queue.pyd'>,
 'six.moves.queue': <module 'queue' from 'D:\\Anaconda\\lib\\queue.py'>,
 'prompt_toolkit.eventloop.coroutine': <module 'prompt_toolkit.eventloop.coroutine' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\eventloop\\coroutine.py'>,
 'prompt_toolkit.eventloop.defaults': <module 'prompt_toolkit.eventloop.defaults' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\eventloop\\defaults.py'>,
 'prompt_toolkit.utils': <module 'prompt_toolkit.utils' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\utils.py'>,
 'wcwidth': <module 'wcwidth' from 'D:\\Anaconda\\lib\\site-packages\\wcwidth\\__init__.py'>,
 'wcwidth.wcwidth': <module 'wcwidth.wcwidth' from 'D:\\Anaconda\\lib\\site-packages\\wcwidth\\wcwidth.py'>,
 'wcwidth.table_wide': <module 'wcwidth.table_wide' from 'D:\\Anaconda\\lib\\site-packages\\wcwidth\\table_wide.py'>,
 'wcwidth.table_zero': <module 'wcwidth.table_zero' from 'D:\\Anaconda\\lib\\site-packages\\wcwidth\\table_zero.py'>,
 'prompt_toolkit.cache': <module 'prompt_toolkit.cache' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\cache.py'>,
 'prompt_toolkit.eventloop.base': <module 'prompt_toolkit.eventloop.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\eventloop\\base.py'>,
 'prompt_toolkit.log': <module 'prompt_toolkit.log' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\log.py'>,
 'prompt_toolkit.eventloop.future': <module 'prompt_toolkit.eventloop.future' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\eventloop\\future.py'>,
 'prompt_toolkit.eventloop.context': <module 'prompt_toolkit.eventloop.context' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\eventloop\\context.py'>,
 'prompt_toolkit.eventloop.event': <module 'prompt_toolkit.eventloop.event' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\eventloop\\event.py'>,
 'prompt_toolkit.application.run_in_terminal': <module 'prompt_toolkit.application.run_in_terminal' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\application\\run_in_terminal.py'>,
 'prompt_toolkit.auto_suggest': <module 'prompt_toolkit.auto_suggest' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\auto_suggest.py'>,
 'prompt_toolkit.filters': <module 'prompt_toolkit.filters' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\filters\\__init__.py'>,
 'prompt_toolkit.filters.app': <module 'prompt_toolkit.filters.app' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\filters\\app.py'>,
 'prompt_toolkit.enums': <module 'prompt_toolkit.enums' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\enums.py'>,
 'prompt_toolkit.filters.base': <module 'prompt_toolkit.filters.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\filters\\base.py'>,
 'prompt_toolkit.filters.cli': <module 'prompt_toolkit.filters.cli' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\filters\\cli.py'>,
 'prompt_toolkit.filters.utils': <module 'prompt_toolkit.filters.utils' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\filters\\utils.py'>,
 'prompt_toolkit.clipboard': <module 'prompt_toolkit.clipboard' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\clipboard\\__init__.py'>,
 'prompt_toolkit.clipboard.base': <module 'prompt_toolkit.clipboard.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\clipboard\\base.py'>,
 'prompt_toolkit.selection': <module 'prompt_toolkit.selection' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\selection.py'>,
 'prompt_toolkit.clipboard.in_memory': <module 'prompt_toolkit.clipboard.in_memory' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\clipboard\\in_memory.py'>,
 'prompt_toolkit.completion': <module 'prompt_toolkit.completion' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\completion\\__init__.py'>,
 'prompt_toolkit.completion.base': <module 'prompt_toolkit.completion.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\completion\\base.py'>,
 'prompt_toolkit.completion.filesystem': <module 'prompt_toolkit.completion.filesystem' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\completion\\filesystem.py'>,
 'prompt_toolkit.completion.fuzzy_completer': <module 'prompt_toolkit.completion.fuzzy_completer' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\completion\\fuzzy_completer.py'>,
 'prompt_toolkit.document': <module 'prompt_toolkit.document' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\document.py'>,
 'prompt_toolkit.completion.word_completer': <module 'prompt_toolkit.completion.word_completer' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\completion\\word_completer.py'>,
 'prompt_toolkit.history': <module 'prompt_toolkit.history' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\history.py'>,
 'prompt_toolkit.search': <module 'prompt_toolkit.search' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\search.py'>,
 'prompt_toolkit.key_binding': <module 'prompt_toolkit.key_binding' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\__init__.py'>,
 'prompt_toolkit.key_binding.key_bindings': <module 'prompt_toolkit.key_binding.key_bindings' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\key_bindings.py'>,
 'prompt_toolkit.keys': <module 'prompt_toolkit.keys' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\keys.py'>,
 'prompt_toolkit.key_binding.vi_state': <module 'prompt_toolkit.key_binding.vi_state' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\vi_state.py'>,
 'prompt_toolkit.validation': <module 'prompt_toolkit.validation' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\validation.py'>,
 'prompt_toolkit.input': <module 'prompt_toolkit.input' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\input\\__init__.py'>,
 'prompt_toolkit.input.base': <module 'prompt_toolkit.input.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\input\\base.py'>,
 'prompt_toolkit.input.defaults': <module 'prompt_toolkit.input.defaults' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\input\\defaults.py'>,
 'prompt_toolkit.input.typeahead': <module 'prompt_toolkit.input.typeahead' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\input\\typeahead.py'>,
 'prompt_toolkit.key_binding.bindings': <module 'prompt_toolkit.key_binding.bindings' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\__init__.py'>,
 'prompt_toolkit.key_binding.bindings.page_navigation': <module 'prompt_toolkit.key_binding.bindings.page_navigation' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\page_navigation.py'>,
 'prompt_toolkit.key_binding.bindings.scroll': <module 'prompt_toolkit.key_binding.bindings.scroll' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\scroll.py'>,
 'prompt_toolkit.key_binding.defaults': <module 'prompt_toolkit.key_binding.defaults' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\defaults.py'>,
 'prompt_toolkit.key_binding.bindings.basic': <module 'prompt_toolkit.key_binding.bindings.basic' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\basic.py'>,
 'prompt_toolkit.key_binding.key_processor': <module 'prompt_toolkit.key_binding.key_processor' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\key_processor.py'>,
 'prompt_toolkit.key_binding.bindings.named_commands': <module 'prompt_toolkit.key_binding.bindings.named_commands' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\named_commands.py'>,
 'prompt_toolkit.key_binding.bindings.completion': <module 'prompt_toolkit.key_binding.bindings.completion' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\completion.py'>,
 'prompt_toolkit.key_binding.bindings.cpr': <module 'prompt_toolkit.key_binding.bindings.cpr' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\cpr.py'>,
 'prompt_toolkit.key_binding.bindings.emacs': <module 'prompt_toolkit.key_binding.bindings.emacs' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\emacs.py'>,
 'prompt_toolkit.key_binding.bindings.mouse': <module 'prompt_toolkit.key_binding.bindings.mouse' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\mouse.py'>,
 'prompt_toolkit.layout': <module 'prompt_toolkit.layout' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\__init__.py'>,
 'prompt_toolkit.layout.containers': <module 'prompt_toolkit.layout.containers' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\containers.py'>,
 'prompt_toolkit.formatted_text': <module 'prompt_toolkit.formatted_text' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\formatted_text\\__init__.py'>,
 'prompt_toolkit.formatted_text.ansi': <module 'prompt_toolkit.formatted_text.ansi' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\formatted_text\\ansi.py'>,
 'prompt_toolkit.output': <module 'prompt_toolkit.output' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\output\\__init__.py'>,
 'prompt_toolkit.output.base': <module 'prompt_toolkit.output.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\output\\base.py'>,
 'prompt_toolkit.layout.screen': <module 'prompt_toolkit.layout.screen' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\screen.py'>,
 'prompt_toolkit.output.color_depth': <module 'prompt_toolkit.output.color_depth' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\output\\color_depth.py'>,
 'prompt_toolkit.output.defaults': <module 'prompt_toolkit.output.defaults' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\output\\defaults.py'>,
 'prompt_toolkit.output.vt100': <module 'prompt_toolkit.output.vt100' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\output\\vt100.py'>,
 'array': <module 'array' (built-in)>,
 'prompt_toolkit.styles': <module 'prompt_toolkit.styles' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\styles\\__init__.py'>,
 'prompt_toolkit.styles.base': <module 'prompt_toolkit.styles.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\styles\\base.py'>,
 'prompt_toolkit.styles.defaults': <module 'prompt_toolkit.styles.defaults' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\styles\\defaults.py'>,
 'prompt_toolkit.styles.named_colors': <module 'prompt_toolkit.styles.named_colors' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\styles\\named_colors.py'>,
 'prompt_toolkit.styles.style': <module 'prompt_toolkit.styles.style' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\styles\\style.py'>,
 'prompt_toolkit.styles.pygments': <module 'prompt_toolkit.styles.pygments' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\styles\\pygments.py'>,
 'prompt_toolkit.styles.style_transformation': <module 'prompt_toolkit.styles.style_transformation' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\styles\\style_transformation.py'>,
 'colorsys': <module 'colorsys' from 'D:\\Anaconda\\lib\\colorsys.py'>,
 'prompt_toolkit.formatted_text.base': <module 'prompt_toolkit.formatted_text.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\formatted_text\\base.py'>,
 'prompt_toolkit.formatted_text.html': <module 'prompt_toolkit.formatted_text.html' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\formatted_text\\html.py'>,
 'xml': <module 'xml' from 'D:\\Anaconda\\lib\\xml\\__init__.py'>,
 'xml.dom': <module 'xml.dom' from 'D:\\Anaconda\\lib\\xml\\dom\\__init__.py'>,
 'xml.dom.domreg': <module 'xml.dom.domreg' from 'D:\\Anaconda\\lib\\xml\\dom\\domreg.py'>,
 'xml.dom.minidom': <module 'xml.dom.minidom' from 'D:\\Anaconda\\lib\\xml\\dom\\minidom.py'>,
 'xml.dom.minicompat': <module 'xml.dom.minicompat' from 'D:\\Anaconda\\lib\\xml\\dom\\minicompat.py'>,
 'xml.dom.xmlbuilder': <module 'xml.dom.xmlbuilder' from 'D:\\Anaconda\\lib\\xml\\dom\\xmlbuilder.py'>,
 'xml.dom.NodeFilter': <module 'xml.dom.NodeFilter' from 'D:\\Anaconda\\lib\\xml\\dom\\NodeFilter.py'>,
 'prompt_toolkit.formatted_text.pygments': <module 'prompt_toolkit.formatted_text.pygments' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\formatted_text\\pygments.py'>,
 'prompt_toolkit.formatted_text.utils': <module 'prompt_toolkit.formatted_text.utils' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\formatted_text\\utils.py'>,
 'prompt_toolkit.mouse_events': <module 'prompt_toolkit.mouse_events' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\mouse_events.py'>,
 'prompt_toolkit.layout.controls': <module 'prompt_toolkit.layout.controls' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\controls.py'>,
 'prompt_toolkit.lexers': <module 'prompt_toolkit.lexers' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\lexers\\__init__.py'>,
 'prompt_toolkit.lexers.base': <module 'prompt_toolkit.lexers.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\lexers\\base.py'>,
 'prompt_toolkit.lexers.pygments': <module 'prompt_toolkit.lexers.pygments' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\lexers\\pygments.py'>,
 'prompt_toolkit.layout.processors': <module 'prompt_toolkit.layout.processors' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\processors.py'>,
 'prompt_toolkit.layout.utils': <module 'prompt_toolkit.layout.utils' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\utils.py'>,
 'prompt_toolkit.layout.dimension': <module 'prompt_toolkit.layout.dimension' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\dimension.py'>,
 'prompt_toolkit.layout.margins': <module 'prompt_toolkit.layout.margins' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\margins.py'>,
 'prompt_toolkit.layout.layout': <module 'prompt_toolkit.layout.layout' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\layout.py'>,
 'prompt_toolkit.layout.menus': <module 'prompt_toolkit.layout.menus' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\menus.py'>,
 'prompt_toolkit.renderer': <module 'prompt_toolkit.renderer' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\renderer.py'>,
 'prompt_toolkit.layout.mouse_handlers': <module 'prompt_toolkit.layout.mouse_handlers' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\mouse_handlers.py'>,
 'prompt_toolkit.key_binding.bindings.vi': <module 'prompt_toolkit.key_binding.bindings.vi' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\vi.py'>,
 'prompt_toolkit.input.vt100_parser': <module 'prompt_toolkit.input.vt100_parser' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\input\\vt100_parser.py'>,
 'prompt_toolkit.input.ansi_escape_sequences': <module 'prompt_toolkit.input.ansi_escape_sequences' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\input\\ansi_escape_sequences.py'>,
 'prompt_toolkit.key_binding.digraphs': <module 'prompt_toolkit.key_binding.digraphs' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\digraphs.py'>,
 'prompt_toolkit.key_binding.emacs_state': <module 'prompt_toolkit.key_binding.emacs_state' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\emacs_state.py'>,
 'prompt_toolkit.layout.dummy': <module 'prompt_toolkit.layout.dummy' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\layout\\dummy.py'>,
 'prompt_toolkit.application.dummy': <module 'prompt_toolkit.application.dummy' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\application\\dummy.py'>,
 'prompt_toolkit.shortcuts': <module 'prompt_toolkit.shortcuts' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\shortcuts\\__init__.py'>,
 'prompt_toolkit.shortcuts.dialogs': <module 'prompt_toolkit.shortcuts.dialogs' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\shortcuts\\dialogs.py'>,
 'prompt_toolkit.key_binding.bindings.focus': <module 'prompt_toolkit.key_binding.bindings.focus' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\focus.py'>,
 'prompt_toolkit.widgets': <module 'prompt_toolkit.widgets' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\widgets\\__init__.py'>,
 'prompt_toolkit.widgets.base': <module 'prompt_toolkit.widgets.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\widgets\\base.py'>,
 'prompt_toolkit.widgets.toolbars': <module 'prompt_toolkit.widgets.toolbars' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\widgets\\toolbars.py'>,
 'prompt_toolkit.widgets.dialogs': <module 'prompt_toolkit.widgets.dialogs' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\widgets\\dialogs.py'>,
 'prompt_toolkit.widgets.menus': <module 'prompt_toolkit.widgets.menus' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\widgets\\menus.py'>,
 'prompt_toolkit.shortcuts.progress_bar': <module 'prompt_toolkit.shortcuts.progress_bar' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\shortcuts\\progress_bar\\__init__.py'>,
 'prompt_toolkit.shortcuts.progress_bar.base': <module 'prompt_toolkit.shortcuts.progress_bar.base' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\shortcuts\\progress_bar\\base.py'>,
 'prompt_toolkit.shortcuts.progress_bar.formatters': <module 'prompt_toolkit.shortcuts.progress_bar.formatters' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\shortcuts\\progress_bar\\formatters.py'>,
 'prompt_toolkit.shortcuts.prompt': <module 'prompt_toolkit.shortcuts.prompt' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\shortcuts\\prompt.py'>,
 'prompt_toolkit.key_binding.bindings.auto_suggest': <module 'prompt_toolkit.key_binding.bindings.auto_suggest' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\auto_suggest.py'>,
 'prompt_toolkit.key_binding.bindings.open_in_editor': <module 'prompt_toolkit.key_binding.bindings.open_in_editor' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\key_binding\\bindings\\open_in_editor.py'>,
 'prompt_toolkit.shortcuts.utils': <module 'prompt_toolkit.shortcuts.utils' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\shortcuts\\utils.py'>,
 'prompt_toolkit.patch_stdout': <module 'prompt_toolkit.patch_stdout' from 'D:\\Anaconda\\lib\\site-packages\\prompt_toolkit\\patch_stdout.py'>,
 'pygments.style': <module 'pygments.style' from 'D:\\Anaconda\\lib\\site-packages\\pygments\\style.py'>,
 'IPython.terminal.debugger': <module 'IPython.terminal.debugger' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\debugger.py'>,
 'IPython.core.completer': <module 'IPython.core.completer' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\completer.py'>,
 'unicodedata': <module 'unicodedata' from 'D:\\Anaconda\\DLLs\\unicodedata.pyd'>,
 'IPython.core.latex_symbols': <module 'IPython.core.latex_symbols' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\latex_symbols.py'>,
 'IPython.utils.generics': <module 'IPython.utils.generics' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\generics.py'>,
 'jedi': <module 'jedi' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\__init__.py'>,
 'jedi.api': <module 'jedi.api' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\__init__.py'>,
 'parso': <module 'parso' from 'D:\\Anaconda\\lib\\site-packages\\parso\\__init__.py'>,
 'parso.parser': <module 'parso.parser' from 'D:\\Anaconda\\lib\\site-packages\\parso\\parser.py'>,
 'parso.tree': <module 'parso.tree' from 'D:\\Anaconda\\lib\\site-packages\\parso\\tree.py'>,
 'parso._compatibility': <module 'parso._compatibility' from 'D:\\Anaconda\\lib\\site-packages\\parso\\_compatibility.py'>,
 'parso.utils': <module 'parso.utils' from 'D:\\Anaconda\\lib\\site-packages\\parso\\utils.py'>,
 'parso.pgen2': <module 'parso.pgen2' from 'D:\\Anaconda\\lib\\site-packages\\parso\\pgen2\\__init__.py'>,
 'parso.pgen2.generator': <module 'parso.pgen2.generator' from 'D:\\Anaconda\\lib\\site-packages\\parso\\pgen2\\generator.py'>,
 'parso.pgen2.grammar_parser': <module 'parso.pgen2.grammar_parser' from 'D:\\Anaconda\\lib\\site-packages\\parso\\pgen2\\grammar_parser.py'>,
 'parso.python': <module 'parso.python' from 'D:\\Anaconda\\lib\\site-packages\\parso\\python\\__init__.py'>,
 'parso.python.tokenize': <module 'parso.python.tokenize' from 'D:\\Anaconda\\lib\\site-packages\\parso\\python\\tokenize.py'>,
 'parso.python.token': <module 'parso.python.token' from 'D:\\Anaconda\\lib\\site-packages\\parso\\python\\token.py'>,
 'parso.grammar': <module 'parso.grammar' from 'D:\\Anaconda\\lib\\site-packages\\parso\\grammar.py'>,
 'parso.python.diff': <module 'parso.python.diff' from 'D:\\Anaconda\\lib\\site-packages\\parso\\python\\diff.py'>,
 'difflib': <module 'difflib' from 'D:\\Anaconda\\lib\\difflib.py'>,
 'parso.python.parser': <module 'parso.python.parser' from 'D:\\Anaconda\\lib\\site-packages\\parso\\python\\parser.py'>,
 'parso.python.tree': <module 'parso.python.tree' from 'D:\\Anaconda\\lib\\site-packages\\parso\\python\\tree.py'>,
 'parso.python.prefix': <module 'parso.python.prefix' from 'D:\\Anaconda\\lib\\site-packages\\parso\\python\\prefix.py'>,
 'parso.cache': <module 'parso.cache' from 'D:\\Anaconda\\lib\\site-packages\\parso\\cache.py'>,
 'gc': <module 'gc' (built-in)>,
 'parso.python.errors': <module 'parso.python.errors' from 'D:\\Anaconda\\lib\\site-packages\\parso\\python\\errors.py'>,
 'parso.normalizer': <module 'parso.normalizer' from 'D:\\Anaconda\\lib\\site-packages\\parso\\normalizer.py'>,
 'parso.python.pep8': <module 'parso.python.pep8' from 'D:\\Anaconda\\lib\\site-packages\\parso\\python\\pep8.py'>,
 'parso.file_io': <module 'parso.file_io' from 'D:\\Anaconda\\lib\\site-packages\\parso\\file_io.py'>,
 'jedi._compatibility': <module 'jedi._compatibility' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\_compatibility.py'>,
 'jedi.file_io': <module 'jedi.file_io' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\file_io.py'>,
 'jedi.parser_utils': <module 'jedi.parser_utils' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\parser_utils.py'>,
 'jedi.debug': <module 'jedi.debug' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\debug.py'>,
 'jedi.settings': <module 'jedi.settings' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\settings.py'>,
 'jedi.cache': <module 'jedi.cache' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\cache.py'>,
 'jedi.api.classes': <module 'jedi.api.classes' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\classes.py'>,
 'jedi.evaluate': <module 'jedi.evaluate' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\__init__.py'>,
 'jedi.evaluate.utils': <module 'jedi.evaluate.utils' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\utils.py'>,
 'jedi.evaluate.imports': <module 'jedi.evaluate.imports' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\imports.py'>,
 'jedi.evaluate.sys_path': <module 'jedi.evaluate.sys_path' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\sys_path.py'>,
 'jedi.evaluate.cache': <module 'jedi.evaluate.cache' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\cache.py'>,
 'jedi.evaluate.base_context': <module 'jedi.evaluate.base_context' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\base_context.py'>,
 'jedi.common': <module 'jedi.common' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\common\\__init__.py'>,
 'jedi.common.context': <module 'jedi.common.context' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\common\\context.py'>,
 'jedi.evaluate.helpers': <module 'jedi.evaluate.helpers' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\helpers.py'>,
 'jedi.common.utils': <module 'jedi.common.utils' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\common\\utils.py'>,
 'jedi.evaluate.compiled': <module 'jedi.evaluate.compiled' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\compiled\\__init__.py'>,
 'jedi.evaluate.compiled.context': <module 'jedi.evaluate.compiled.context' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\compiled\\context.py'>,
 'jedi.evaluate.filters': <module 'jedi.evaluate.filters' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\filters.py'>,
 'jedi.evaluate.flow_analysis': <module 'jedi.evaluate.flow_analysis' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\flow_analysis.py'>,
 'jedi.evaluate.recursion': <module 'jedi.evaluate.recursion' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\recursion.py'>,
 'jedi.evaluate.names': <module 'jedi.evaluate.names' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\names.py'>,
 'jedi.evaluate.lazy_context': <module 'jedi.evaluate.lazy_context' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\lazy_context.py'>,
 'jedi.evaluate.compiled.access': <module 'jedi.evaluate.compiled.access' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\compiled\\access.py'>,
 'jedi.evaluate.compiled.getattr_static': <module 'jedi.evaluate.compiled.getattr_static' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\compiled\\getattr_static.py'>,
 'jedi.evaluate.signature': <module 'jedi.evaluate.signature' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\signature.py'>,
 'jedi.evaluate.analysis': <module 'jedi.evaluate.analysis' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\analysis.py'>,
 'jedi.evaluate.gradual': <module 'jedi.evaluate.gradual' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\gradual\\__init__.py'>,
 'jedi.evaluate.gradual.typeshed': <module 'jedi.evaluate.gradual.typeshed' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\gradual\\typeshed.py'>,
 'jedi.evaluate.gradual.stub_context': <module 'jedi.evaluate.gradual.stub_context' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\gradual\\stub_context.py'>,
 'jedi.evaluate.context': <module 'jedi.evaluate.context' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\context\\__init__.py'>,
 'jedi.evaluate.context.module': <module 'jedi.evaluate.context.module' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\context\\module.py'>,
 'jedi.evaluate.context.klass': <module 'jedi.evaluate.context.klass' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\context\\klass.py'>,
 'jedi.evaluate.arguments': <module 'jedi.evaluate.arguments' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\arguments.py'>,
 'jedi.evaluate.context.iterable': <module 'jedi.evaluate.context.iterable' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\context\\iterable.py'>,
 'jedi.evaluate.param': <module 'jedi.evaluate.param' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\param.py'>,
 'jedi.evaluate.docstrings': <module 'jedi.evaluate.docstrings' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\docstrings.py'>,
 'jedi.evaluate.context.function': <module 'jedi.evaluate.context.function' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\context\\function.py'>,
 'jedi.evaluate.parser_cache': <module 'jedi.evaluate.parser_cache' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\parser_cache.py'>,
 'jedi.plugins': <module 'jedi.plugins' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\plugins\\__init__.py'>,
 'jedi.evaluate.context.instance': <module 'jedi.evaluate.context.instance' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\context\\instance.py'>,
 'jedi.evaluate.gradual.typing': <module 'jedi.evaluate.gradual.typing' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\gradual\\typing.py'>,
 'jedi.evaluate.syntax_tree': <module 'jedi.evaluate.syntax_tree' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\syntax_tree.py'>,
 'jedi.evaluate.finder': <module 'jedi.evaluate.finder' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\finder.py'>,
 'jedi.evaluate.gradual.conversion': <module 'jedi.evaluate.gradual.conversion' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\gradual\\conversion.py'>,
 'jedi.evaluate.gradual.annotation': <module 'jedi.evaluate.gradual.annotation' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\gradual\\annotation.py'>,
 'jedi.evaluate.context.decorator': <module 'jedi.evaluate.context.decorator' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\context\\decorator.py'>,
 'jedi.api.keywords': <module 'jedi.api.keywords' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\keywords.py'>,
 'pydoc_data': <module 'pydoc_data' from 'D:\\Anaconda\\lib\\pydoc_data\\__init__.py'>,
 'pydoc_data.topics': <module 'pydoc_data.topics' from 'D:\\Anaconda\\lib\\pydoc_data\\topics.py'>,
 'jedi.api.interpreter': <module 'jedi.api.interpreter' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\interpreter.py'>,
 'jedi.evaluate.compiled.mixed': <module 'jedi.evaluate.compiled.mixed' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\compiled\\mixed.py'>,
 'jedi.api.helpers': <module 'jedi.api.helpers' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\helpers.py'>,
 'jedi.api.completion': <module 'jedi.api.completion' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\completion.py'>,
 'jedi.api.file_name': <module 'jedi.api.file_name' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\file_name.py'>,
 'jedi.api.environment': <module 'jedi.api.environment' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\environment.py'>,
 'filecmp': <module 'filecmp' from 'D:\\Anaconda\\lib\\filecmp.py'>,
 'jedi.evaluate.compiled.subprocess': <module 'jedi.evaluate.compiled.subprocess' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\compiled\\subprocess\\__init__.py'>,
 'jedi.evaluate.compiled.subprocess.functions': <module 'jedi.evaluate.compiled.subprocess.functions' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\compiled\\subprocess\\functions.py'>,
 'jedi.api.exceptions': <module 'jedi.api.exceptions' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\exceptions.py'>,
 'jedi.api.project': <module 'jedi.api.project' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\api\\project.py'>,
 'jedi.evaluate.usages': <module 'jedi.evaluate.usages' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\usages.py'>,
 'jedi.evaluate.gradual.utils': <module 'jedi.evaluate.gradual.utils' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\evaluate\\gradual\\utils.py'>,
 'jedi.plugins.registry': <module 'jedi.plugins.registry' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\plugins\\registry.py'>,
 'jedi.plugins.stdlib': <module 'jedi.plugins.stdlib' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\plugins\\stdlib.py'>,
 'jedi.plugins.flask': <module 'jedi.plugins.flask' from 'D:\\Anaconda\\lib\\site-packages\\jedi\\plugins\\flask.py'>,
 'IPython.terminal.ptutils': <module 'IPython.terminal.ptutils' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\ptutils.py'>,
 'IPython.terminal.shortcuts': <module 'IPython.terminal.shortcuts' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\shortcuts.py'>,
 'IPython.lib.clipboard': <module 'IPython.lib.clipboard' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\lib\\clipboard.py'>,
 'IPython.terminal.magics': <module 'IPython.terminal.magics' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\magics.py'>,
 'IPython.terminal.pt_inputhooks': <module 'IPython.terminal.pt_inputhooks' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\pt_inputhooks\\__init__.py'>,
 'IPython.terminal.prompts': <module 'IPython.terminal.prompts' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\prompts.py'>,
 'IPython.terminal.ipapp': <module 'IPython.terminal.ipapp' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\terminal\\ipapp.py'>,
 'IPython.core.magics': <module 'IPython.core.magics' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\__init__.py'>,
 'IPython.core.magics.auto': <module 'IPython.core.magics.auto' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\auto.py'>,
 'IPython.core.magics.basic': <module 'IPython.core.magics.basic' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\basic.py'>,
 'IPython.core.magics.code': <module 'IPython.core.magics.code' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\code.py'>,
 'urllib.request': <module 'urllib.request' from 'D:\\Anaconda\\lib\\urllib\\request.py'>,
 'email': <module 'email' from 'D:\\Anaconda\\lib\\email\\__init__.py'>,
 'http': <module 'http' from 'D:\\Anaconda\\lib\\http\\__init__.py'>,
 'http.client': <module 'http.client' from 'D:\\Anaconda\\lib\\http\\client.py'>,
 'email.parser': <module 'email.parser' from 'D:\\Anaconda\\lib\\email\\parser.py'>,
 'email.feedparser': <module 'email.feedparser' from 'D:\\Anaconda\\lib\\email\\feedparser.py'>,
 'email.errors': <module 'email.errors' from 'D:\\Anaconda\\lib\\email\\errors.py'>,
 'email._policybase': <module 'email._policybase' from 'D:\\Anaconda\\lib\\email\\_policybase.py'>,
 'email.header': <module 'email.header' from 'D:\\Anaconda\\lib\\email\\header.py'>,
 'email.quoprimime': <module 'email.quoprimime' from 'D:\\Anaconda\\lib\\email\\quoprimime.py'>,
 'email.base64mime': <module 'email.base64mime' from 'D:\\Anaconda\\lib\\email\\base64mime.py'>,
 'email.charset': <module 'email.charset' from 'D:\\Anaconda\\lib\\email\\charset.py'>,
 'email.encoders': <module 'email.encoders' from 'D:\\Anaconda\\lib\\email\\encoders.py'>,
 'quopri': <module 'quopri' from 'D:\\Anaconda\\lib\\quopri.py'>,
 'email.utils': <module 'email.utils' from 'D:\\Anaconda\\lib\\email\\utils.py'>,
 'email._parseaddr': <module 'email._parseaddr' from 'D:\\Anaconda\\lib\\email\\_parseaddr.py'>,
 'calendar': <module 'calendar' from 'D:\\Anaconda\\lib\\calendar.py'>,
 'email.message': <module 'email.message' from 'D:\\Anaconda\\lib\\email\\message.py'>,
 'uu': <module 'uu' from 'D:\\Anaconda\\lib\\uu.py'>,
 'email._encoded_words': <module 'email._encoded_words' from 'D:\\Anaconda\\lib\\email\\_encoded_words.py'>,
 'email.iterators': <module 'email.iterators' from 'D:\\Anaconda\\lib\\email\\iterators.py'>,
 'urllib.error': <module 'urllib.error' from 'D:\\Anaconda\\lib\\urllib\\error.py'>,
 'urllib.response': <module 'urllib.response' from 'D:\\Anaconda\\lib\\urllib\\response.py'>,
 'nturl2path': <module 'nturl2path' from 'D:\\Anaconda\\lib\\nturl2path.py'>,
 'IPython.core.magics.config': <module 'IPython.core.magics.config' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\config.py'>,
 'IPython.core.magics.display': <module 'IPython.core.magics.display' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\display.py'>,
 'IPython.core.magics.execution': <module 'IPython.core.magics.execution' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\execution.py'>,
 'timeit': <module 'timeit' from 'D:\\Anaconda\\lib\\timeit.py'>,
 'cProfile': <module 'cProfile' from 'D:\\Anaconda\\lib\\cProfile.py'>,
 '_lsprof': <module '_lsprof' (built-in)>,
 'profile': <module 'profile' from 'D:\\Anaconda\\lib\\profile.py'>,
 'pstats': <module 'pstats' from 'D:\\Anaconda\\lib\\pstats.py'>,
 'IPython.utils.module_paths': <module 'IPython.utils.module_paths' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\module_paths.py'>,
 'IPython.utils.timing': <module 'IPython.utils.timing' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\timing.py'>,
 'IPython.core.magics.extension': <module 'IPython.core.magics.extension' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\extension.py'>,
 'IPython.core.magics.history': <module 'IPython.core.magics.history' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\history.py'>,
 'IPython.core.magics.logging': <module 'IPython.core.magics.logging' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\logging.py'>,
 'IPython.core.magics.namespace': <module 'IPython.core.magics.namespace' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\namespace.py'>,
 'IPython.core.magics.osm': <module 'IPython.core.magics.osm' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\osm.py'>,
 'IPython.core.magics.packaging': <module 'IPython.core.magics.packaging' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\packaging.py'>,
 'IPython.core.magics.pylab': <module 'IPython.core.magics.pylab' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\pylab.py'>,
 'IPython.core.pylabtools': <module 'IPython.core.pylabtools' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\pylabtools.py'>,
 'IPython.core.magics.script': <module 'IPython.core.magics.script' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\magics\\script.py'>,
 'IPython.lib.backgroundjobs': <module 'IPython.lib.backgroundjobs' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\lib\\backgroundjobs.py'>,
 'IPython.core.shellapp': <module 'IPython.core.shellapp' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\shellapp.py'>,
 'IPython.extensions': <module 'IPython.extensions' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\extensions\\__init__.py'>,
 'IPython.extensions.storemagic': <module 'IPython.extensions.storemagic' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\extensions\\storemagic.py'>,
 'IPython.utils.frame': <module 'IPython.utils.frame' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\frame.py'>,
 'jupyter_client': <module 'jupyter_client' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\__init__.py'>,
 'jupyter_client._version': <module 'jupyter_client._version' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\_version.py'>,
 'jupyter_client.connect': <module 'jupyter_client.connect' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\connect.py'>,
 'zmq': <module 'zmq' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\__init__.py'>,
 'zmq.backend': <module 'zmq.backend' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\__init__.py'>,
 'zmq.backend.select': <module 'zmq.backend.select' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\select.py'>,
 'zmq.backend.cython': <module 'zmq.backend.cython' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\__init__.py'>,
 'zmq.backend.cython.constants': <module 'zmq.backend.cython.constants' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\constants.cp37-win_amd64.pyd'>,
 'cython_runtime': <module 'cython_runtime'>,
 'zmq.backend.cython.error': <module 'zmq.backend.cython.error' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\error.cp37-win_amd64.pyd'>,
 '_cython_0_29_13': <module '_cython_0_29_13'>,
 'zmq.backend.cython.message': <module 'zmq.backend.cython.message' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\message.cp37-win_amd64.pyd'>,
 'zmq.error': <module 'zmq.error' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\error.py'>,
 'zmq.backend.cython.context': <module 'zmq.backend.cython.context' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\context.cp37-win_amd64.pyd'>,
 'zmq.backend.cython.socket': <module 'zmq.backend.cython.socket' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\socket.cp37-win_amd64.pyd'>,
 'zmq.backend.cython.utils': <module 'zmq.backend.cython.utils' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\utils.cp37-win_amd64.pyd'>,
 'zmq.backend.cython._poll': <module 'zmq.backend.cython._poll' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\_poll.cp37-win_amd64.pyd'>,
 'zmq.backend.cython._version': <module 'zmq.backend.cython._version' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\_version.cp37-win_amd64.pyd'>,
 'zmq.backend.cython._device': <module 'zmq.backend.cython._device' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\_device.cp37-win_amd64.pyd'>,
 'zmq.backend.cython._proxy_steerable': <module 'zmq.backend.cython._proxy_steerable' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\backend\\cython\\_proxy_steerable.cp37-win_amd64.pyd'>,
 'zmq.sugar': <module 'zmq.sugar' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\__init__.py'>,
 'zmq.sugar.constants': <module 'zmq.sugar.constants' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\constants.py'>,
 'zmq.utils': <module 'zmq.utils' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\utils\\__init__.py'>,
 'zmq.utils.constant_names': <module 'zmq.utils.constant_names' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\utils\\constant_names.py'>,
 'zmq.sugar.context': <module 'zmq.sugar.context' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\context.py'>,
 'zmq.sugar.attrsettr': <module 'zmq.sugar.attrsettr' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\attrsettr.py'>,
 'zmq.sugar.socket': <module 'zmq.sugar.socket' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\socket.py'>,
 'zmq.sugar.poll': <module 'zmq.sugar.poll' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\poll.py'>,
 'zmq.utils.jsonapi': <module 'zmq.utils.jsonapi' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\utils\\jsonapi.py'>,
 'zmq.utils.strtypes': <module 'zmq.utils.strtypes' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\utils\\strtypes.py'>,
 'zmq.sugar.frame': <module 'zmq.sugar.frame' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\frame.py'>,
 'zmq.sugar.tracker': <module 'zmq.sugar.tracker' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\tracker.py'>,
 'zmq.sugar.version': <module 'zmq.sugar.version' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\version.py'>,
 'zmq.sugar.stopwatch': <module 'zmq.sugar.stopwatch' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\sugar\\stopwatch.py'>,
 'jupyter_client.localinterfaces': <module 'jupyter_client.localinterfaces' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\localinterfaces.py'>,
 'jupyter_core': <module 'jupyter_core' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_core\\__init__.py'>,
 'jupyter_core.version': <module 'jupyter_core.version' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_core\\version.py'>,
 'jupyter_core.paths': <module 'jupyter_core.paths' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_core\\paths.py'>,
 'jupyter_client.launcher': <module 'jupyter_client.launcher' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\launcher.py'>,
 'traitlets.log': <module 'traitlets.log' from 'D:\\Anaconda\\lib\\site-packages\\traitlets\\log.py'>,
 'jupyter_client.client': <module 'jupyter_client.client' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\client.py'>,
 'jupyter_client.channels': <module 'jupyter_client.channels' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\channels.py'>,
 'jupyter_client.channelsabc': <module 'jupyter_client.channelsabc' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\channelsabc.py'>,
 'jupyter_client.clientabc': <module 'jupyter_client.clientabc' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\clientabc.py'>,
 'jupyter_client.manager': <module 'jupyter_client.manager' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\manager.py'>,
 'jupyter_client.kernelspec': <module 'jupyter_client.kernelspec' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\kernelspec.py'>,
 'jupyter_client.managerabc': <module 'jupyter_client.managerabc' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\managerabc.py'>,
 'jupyter_client.blocking': <module 'jupyter_client.blocking' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\blocking\\__init__.py'>,
 'jupyter_client.blocking.client': <module 'jupyter_client.blocking.client' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\blocking\\client.py'>,
 'jupyter_client.blocking.channels': <module 'jupyter_client.blocking.channels' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\blocking\\channels.py'>,
 'jupyter_client.multikernelmanager': <module 'jupyter_client.multikernelmanager' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\multikernelmanager.py'>,
 'uuid': <module 'uuid' from 'D:\\Anaconda\\lib\\uuid.py'>,
 'ipykernel.kernelapp': <module 'ipykernel.kernelapp' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\kernelapp.py'>,
 'tornado': <module 'tornado' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\__init__.py'>,
 'tornado.ioloop': <module 'tornado.ioloop' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\ioloop.py'>,
 'numbers': <module 'numbers' from 'D:\\Anaconda\\lib\\numbers.py'>,
 'tornado.concurrent': <module 'tornado.concurrent' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\concurrent.py'>,
 'tornado.log': <module 'tornado.log' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\log.py'>,
 'logging.handlers': <module 'logging.handlers' from 'D:\\Anaconda\\lib\\logging\\handlers.py'>,
 'tornado.escape': <module 'tornado.escape' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\escape.py'>,
 'tornado.util': <module 'tornado.util' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\util.py'>,
 'tornado.speedups': <module 'tornado.speedups' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\speedups.cp37-win_amd64.pyd'>,
 'colorama': <module 'colorama' from 'D:\\Anaconda\\lib\\site-packages\\colorama\\__init__.py'>,
 'colorama.initialise': <module 'colorama.initialise' from 'D:\\Anaconda\\lib\\site-packages\\colorama\\initialise.py'>,
 'colorama.ansitowin32': <module 'colorama.ansitowin32' from 'D:\\Anaconda\\lib\\site-packages\\colorama\\ansitowin32.py'>,
 'colorama.ansi': <module 'colorama.ansi' from 'D:\\Anaconda\\lib\\site-packages\\colorama\\ansi.py'>,
 'colorama.winterm': <module 'colorama.winterm' from 'D:\\Anaconda\\lib\\site-packages\\colorama\\winterm.py'>,
 'colorama.win32': <module 'colorama.win32' from 'D:\\Anaconda\\lib\\site-packages\\colorama\\win32.py'>,
 'zmq.eventloop': <module 'zmq.eventloop' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\eventloop\\__init__.py'>,
 'zmq.eventloop.ioloop': <module 'zmq.eventloop.ioloop' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\eventloop\\ioloop.py'>,
 'tornado.platform': <module 'tornado.platform' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\platform\\__init__.py'>,
 'tornado.platform.asyncio': <module 'tornado.platform.asyncio' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\platform\\asyncio.py'>,
 'tornado.gen': <module 'tornado.gen' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\gen.py'>,
 'zmq.eventloop.zmqstream': <module 'zmq.eventloop.zmqstream' from 'D:\\Anaconda\\lib\\site-packages\\zmq\\eventloop\\zmqstream.py'>,
 'ipykernel.iostream': <module 'ipykernel.iostream' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\iostream.py'>,
 'imp': <module 'imp' from 'D:\\Anaconda\\lib\\imp.py'>,
 'jupyter_client.session': <module 'jupyter_client.session' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\session.py'>,
 'hmac': <module 'hmac' from 'D:\\Anaconda\\lib\\hmac.py'>,
 'jupyter_client.jsonutil': <module 'jupyter_client.jsonutil' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\jsonutil.py'>,
 'dateutil': <module 'dateutil' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\__init__.py'>,
 'dateutil._version': <module 'dateutil._version' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\_version.py'>,
 'dateutil.parser': <module 'dateutil.parser' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\parser\\__init__.py'>,
 'dateutil.parser._parser': <module 'dateutil.parser._parser' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\parser\\_parser.py'>,
 'decimal': <module 'decimal' from 'D:\\Anaconda\\lib\\decimal.py'>,
 '_decimal': <module '_decimal' from 'D:\\Anaconda\\DLLs\\_decimal.pyd'>,
 'dateutil.relativedelta': <module 'dateutil.relativedelta' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\relativedelta.py'>,
 'dateutil._common': <module 'dateutil._common' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\_common.py'>,
 'dateutil.tz': <module 'dateutil.tz' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\tz\\__init__.py'>,
 'dateutil.tz.tz': <module 'dateutil.tz.tz' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\tz\\tz.py'>,
 'dateutil.tz._common': <module 'dateutil.tz._common' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\tz\\_common.py'>,
 'dateutil.tz._factories': <module 'dateutil.tz._factories' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\tz\\_factories.py'>,
 'dateutil.tz.win': <module 'dateutil.tz.win' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\tz\\win.py'>,
 'dateutil.parser.isoparser': <module 'dateutil.parser.isoparser' from 'D:\\Anaconda\\lib\\site-packages\\dateutil\\parser\\isoparser.py'>,
 '_strptime': <module '_strptime' from 'D:\\Anaconda\\lib\\_strptime.py'>,
 'jupyter_client.adapter': <module 'jupyter_client.adapter' from 'D:\\Anaconda\\lib\\site-packages\\jupyter_client\\adapter.py'>,
 'ipykernel.heartbeat': <module 'ipykernel.heartbeat' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\heartbeat.py'>,
 'ipykernel.ipkernel': <module 'ipykernel.ipkernel' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\ipkernel.py'>,
 'IPython.utils.tokenutil': <module 'IPython.utils.tokenutil' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\utils\\tokenutil.py'>,
 'ipykernel.comm': <module 'ipykernel.comm' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\comm\\__init__.py'>,
 'ipykernel.comm.manager': <module 'ipykernel.comm.manager' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\comm\\manager.py'>,
 'ipykernel.comm.comm': <module 'ipykernel.comm.comm' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\comm\\comm.py'>,
 'ipykernel.kernelbase': <module 'ipykernel.kernelbase' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\kernelbase.py'>,
 'tornado.queues': <module 'tornado.queues' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\queues.py'>,
 'tornado.locks': <module 'tornado.locks' from 'D:\\Anaconda\\lib\\site-packages\\tornado\\locks.py'>,
 'ipykernel.jsonutil': <module 'ipykernel.jsonutil' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\jsonutil.py'>,
 'ipykernel.zmqshell': <module 'ipykernel.zmqshell' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\zmqshell.py'>,
 'IPython.core.payloadpage': <module 'IPython.core.payloadpage' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\payloadpage.py'>,
 'ipykernel.displayhook': <module 'ipykernel.displayhook' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\displayhook.py'>,
 'ipykernel.parentpoller': <module 'ipykernel.parentpoller' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\parentpoller.py'>,
 'win32api': <module 'win32api' from 'D:\\Anaconda\\lib\\site-packages\\win32\\win32api.pyd'>,
 'win32security': <module 'win32security' from 'D:\\Anaconda\\lib\\site-packages\\win32\\win32security.pyd'>,
 'ntsecuritycon': <module 'ntsecuritycon' from 'D:\\Anaconda\\lib\\site-packages\\win32\\lib\\ntsecuritycon.py'>,
 'faulthandler': <module 'faulthandler' (built-in)>,
 'ipykernel.datapub': <module 'ipykernel.datapub' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\datapub.py'>,
 'ipykernel.serialize': <module 'ipykernel.serialize' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\serialize.py'>,
 'ipykernel.pickleutil': <module 'ipykernel.pickleutil' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\pickleutil.py'>,
 'ipykernel.codeutil': <module 'ipykernel.codeutil' from 'D:\\Anaconda\\lib\\site-packages\\ipykernel\\codeutil.py'>,
 'IPython.core.completerlib': <module 'IPython.core.completerlib' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\core\\completerlib.py'>,
 'storemagic': <module 'storemagic' from 'D:\\Anaconda\\lib\\site-packages\\IPython\\extensions\\storemagic.py'>,
 'ipywidgets': <module 'ipywidgets' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\__init__.py'>,
 'ipywidgets._version': <module 'ipywidgets._version' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\_version.py'>,
 'ipywidgets.widgets': <module 'ipywidgets.widgets' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\__init__.py'>,
 'ipywidgets.widgets.widget': <module 'ipywidgets.widgets.widget' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget.py'>,
 'ipywidgets.widgets.domwidget': <module 'ipywidgets.widgets.domwidget' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\domwidget.py'>,
 'ipywidgets.widgets.trait_types': <module 'ipywidgets.widgets.trait_types' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\trait_types.py'>,
 'ipywidgets.widgets.util': <module 'ipywidgets.widgets.util' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\util.py'>,
 'ipywidgets.widgets.widget_layout': <module 'ipywidgets.widgets.widget_layout' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_layout.py'>,
 'ipywidgets.widgets.widget_style': <module 'ipywidgets.widgets.widget_style' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_style.py'>,
 'ipywidgets.widgets.valuewidget': <module 'ipywidgets.widgets.valuewidget' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\valuewidget.py'>,
 'ipywidgets.widgets.widget_core': <module 'ipywidgets.widgets.widget_core' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_core.py'>,
 'ipywidgets.widgets.widget_bool': <module 'ipywidgets.widgets.widget_bool' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_bool.py'>,
 'ipywidgets.widgets.widget_description': <module 'ipywidgets.widgets.widget_description' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_description.py'>,
 'ipywidgets.widgets.widget_button': <module 'ipywidgets.widgets.widget_button' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_button.py'>,
 'ipywidgets.widgets.widget_box': <module 'ipywidgets.widgets.widget_box' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_box.py'>,
 'ipywidgets.widgets.docutils': <module 'ipywidgets.widgets.docutils' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\docutils.py'>,
 'ipywidgets.widgets.widget_float': <module 'ipywidgets.widgets.widget_float' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_float.py'>,
 'ipywidgets.widgets.widget_int': <module 'ipywidgets.widgets.widget_int' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_int.py'>,
 'ipywidgets.widgets.widget_color': <module 'ipywidgets.widgets.widget_color' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_color.py'>,
 'ipywidgets.widgets.widget_date': <module 'ipywidgets.widgets.widget_date' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_date.py'>,
 'ipywidgets.widgets.widget_output': <module 'ipywidgets.widgets.widget_output' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_output.py'>,
 'ipywidgets.widgets.widget_selection': <module 'ipywidgets.widgets.widget_selection' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_selection.py'>,
 'ipywidgets.widgets.widget_selectioncontainer': <module 'ipywidgets.widgets.widget_selectioncontainer' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_selectioncontainer.py'>,
 'ipywidgets.widgets.widget_string': <module 'ipywidgets.widgets.widget_string' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_string.py'>,
 'ipywidgets.widgets.widget_controller': <module 'ipywidgets.widgets.widget_controller' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_controller.py'>,
 'ipywidgets.widgets.interaction': <module 'ipywidgets.widgets.interaction' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\interaction.py'>,
 'ipywidgets.widgets.widget_link': <module 'ipywidgets.widgets.widget_link' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_link.py'>,
 'ipywidgets.widgets.widget_media': <module 'ipywidgets.widgets.widget_media' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_media.py'>,
 'ipywidgets.widgets.widget_templates': <module 'ipywidgets.widgets.widget_templates' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_templates.py'>,
 'ipywidgets.widgets.widget_upload': <module 'ipywidgets.widgets.widget_upload' from 'D:\\Anaconda\\lib\\site-packages\\ipywidgets\\widgets\\widget_upload.py'>}

sys.builtin_module_names

该属性是一个字符串元组,其中的元素均为当前所使用的的 Python 解释器内置的模块名称。

sys.builtin_module_names
('_abc',
 '_ast',
 '_bisect',
 '_blake2',
 '_codecs',
 '_codecs_cn',
 '_codecs_hk',
 '_codecs_iso2022',
 '_codecs_jp',
 '_codecs_kr',
 '_codecs_tw',
 '_collections',
 '_contextvars',
 '_csv',
 '_datetime',
 '_functools',
 '_heapq',
 '_imp',
 '_io',
 '_json',
 '_locale',
 '_lsprof',
 '_md5',
 '_multibytecodec',
 '_opcode',
 '_operator',
 '_pickle',
 '_random',
 '_sha1',
 '_sha256',
 '_sha3',
 '_sha512',
 '_signal',
 '_sre',
 '_stat',
 '_string',
 '_struct',
 '_symtable',
 '_thread',
 '_tracemalloc',
 '_warnings',
 '_weakref',
 '_winapi',
 'array',
 'atexit',
 'audioop',
 'binascii',
 'builtins',
 'cmath',
 'errno',
 'faulthandler',
 'gc',
 'itertools',
 'marshal',
 'math',
 'mmap',
 'msvcrt',
 'nt',
 'parser',
 'sys',
 'time',
 'winreg',
 'xxsubtype',
 'zipimport',
 'zlib')

sys.path

该属性是一个由字符串组成的列表,其中各个元素表示的是 Python 搜索模块的路径;在程序启动期间被初始化。

其中第一个元素(也就是path[0])的值是最初调用 Python 解释器的脚本所在的绝对路径;如果是在交互式环境下查看sys.path的值,就会得到一个空字符串。

sys.path
['C:\\Users\\WangChengLong\\Desktop\\python基础知识训练',
 'D:\\Anaconda\\python37.zip',
 'D:\\Anaconda\\DLLs',
 'D:\\Anaconda\\lib',
 'D:\\Anaconda',
 '',
 'C:\\Users\\WangChengLong\\AppData\\Roaming\\Python\\Python37\\site-packages',
 'D:\\Anaconda\\lib\\site-packages',
 'D:\\Anaconda\\lib\\site-packages\\win32',
 'D:\\Anaconda\\lib\\site-packages\\win32\\lib',
 'D:\\Anaconda\\lib\\site-packages\\Pythonwin',
 'D:\\Anaconda\\lib\\site-packages\\IPython\\extensions',
 'C:\\Users\\WangChengLong\\.ipython']

sys.stdin,sys.stdout,sys.stderr

  • sys.stdin:标准输入,初始的标准输入为从键盘,可以将sys.stdin=赋值为某个类文件的对象,改为从该对象中输入
  • sys.stdout:标准输出,默认输出到屏幕上,将sys.stdout=赋值为某个file-like对象,输出到该对象中
  • sys.stderr:与前面两个属性类似,只不过该属性标识的是标准错误,通常也是定向到屏幕的,可以粗糙地认为是一个输出错误信息的特殊的标准输出流。

sys模块中还存在几个“私有”属性:sys.__stdin__,sys.__stdout__,sys.__stderr__。这几个属性中保存的就是最初定向的“标准输入”、“标准输出”和“标准错误”流。在适当的时侯,我们可以借助这三个属性将sys.stdin、sys.stdout和sys.err恢复为初始值。

sys.stdin=sys.__stdin__
##改变标准输入
##在shell中会改变,在交互式中不会
with open('glob/t1.txt','r+') as f:
    savedstdin,sys.stdin=sys.stdin,f
    input()
    sys.stdin=savedstdin
a

'a'
##改变标准输出
with open('glob/t0.txt','r+') as f:
    savedstdout,sys.stdout=sys.stdout,f#保留最初定向以及重定向
    print('this text is for file')
    sys.stdout=savedstdout
    print('读取文件内容:',f.readlines())
    print('this text is for screen')
读取文件内容: ['这是第0个txt文本\n', 'this text is for file\n', '\n']
this text is for screen

Python标准输出重定向

正则匹配 re

数学

math

import math
函数 用途
math.ceil(x) 返回大于或等于x的最小整数
math.copysign(x,y) 给x赋予y的符号(正负)
math.fabs(x) x的绝对值
math.factorial(x) x的阶乘
math.floor(x) 返回小于或等于x的最大整数
math.fmod(x,y) 首选于浮点数的求余数,在整数求余时是x%y
math.frexp(x) 将 x 的尾数和指数作为对 (m, e) 返回。 m 是一个浮点数,e 是一个整数,使得 x == m * 2**e 正好。如果 x 为零,则返回 (0.0, 0),否则 0.5 <= abs(m) < 1。这用于以可移植的方式“挑选”浮点数的内部表示。
math.fsum(iterable) 用于浮点数求和,可以不丢失精度
math.gcd(a,b) 返回a和b的最大公因数
math.isclose(a,b, * ,rel_tol=1e-09,abs_tol=0.0) 判断两个函数是否足够相近,也即精度是否达到了。
rel_tol:是一个相对数,相对于a,b的值,精度为rel_tol * max(a,b)
abs_tol:为绝对精度,与a,b的值无关。当abs(a-b)<=max(rel_tol * max(a,b),abs_tol)时,判断为正确.
空值NaN与任何值都不相似,无穷 inf and -inf 只与他们自己相似
math.isfinite(x) 当x不是infinite,NAN。或者False时返回True,0返回True
math.isinf(x) 当x是inf,或者-inf返回True
math.isnan(x) 当x是NaN时返回True
math.ldexp(x,i) x * (2 ** i),frexp的逆函数
math.modf(x) 返回x的整数和小数部分,每个部分都有符号且是浮点数。
math.remainder(x,y) x-n ** y,n是最接近y/x的整数,同样近选小的,所以余数可能是负数.
math.trunc(x) 去尾法返回整数
math.exp(x) $e^x$
math.expm1(x)
math.log(x[base]) 以base为底的对数,默认是e
math.log1p(x)
math.log2(x) 以2为底的对数
math.log10(x) 以10为底的对数
math.pow(x,y) $x^y$
math.sqrt(x) $\sqrt{x}$
math.acos(x) $arccos(x)$
math.asin(x) $arcsin(x)$
math.atan(x) $arctan(x)$
math.atan2(y,x)
math.cos(x) $cos(x)$
math.hypot(x,y) $\sqrt{x^2+y^2}$,返回欧几里得范数 sqrt(xx + yy)。这是向量从原点到点 (x, y) 的长度。
math.sin(x) $sin(x)$
math.tan(x) $cos(x)$
math.degrees(x) 从弧度制转化为角度制
math.radians(x) 从角度制转化为弧度制
math.acosh(x)
math.asinh(x)
math.atanh(x)
math.cosh(x)
math.sinh(x)
math.tanh(x)
math.erf(x)
math.erfc(x)
math.gamma(x)
math.lgamma(x)
math.pi The mathematical constant π = 3.141592…, to available precision.
math.e The mathematical constant e = 2.718281…, to available precision.
math.tau 数学常数 τ = 6.283185…,达到可用精度。 Tau 是一个圆常数,等于 2π,即圆的周长与其半径的比值。
math.inf A floating-point positive infinity. (For negative infinity, use -math.inf.) Equivalent to the output of float(‘inf’).
math.nan A floating-point “not a number” (NaN) value. Equivalent to the output of float(’nan’).

上下限 math.ceil,math.floor

s=5.31
math.ceil(s)#大于或等于s的最小整数
math.floor(s)#小于或等于s的最大整数
6

5
s=5
math.ceil(s)
math.floor(s)
5

5

组合和阶乘 math.comb math.factorial

  • math.comb(n,k) $C_n^k=\frac{n!}{k!(n-k)!}$ 3.10版本才有
  • math.factorial(n) $n!$
n=4
k=2
def comb(n,k):
    '''n>k'''
    return math.factorial(n)/math.factorial(k)/math.factorial(n-k)
comb(4,2)
math.factorial(0)
## math.factorial(math.inf)非整数不行
## math.factorial(-1)负数不行
6.0

1

复制符号 math.copysign

math.copysign(3,-1)
math.copysign(0.0,-1)
-3.0

-0.0

math.fmod,math.fsum,math.fabs

math.fmod(3.5,0.6)
3.5%0.6
math.fmod(-1e-100,1e100)#正确
-1e-100%1e100#错误
0.5000000000000001

0.5000000000000001

-1e-100

1e+100
print('sum求和:{}'.format(sum([0.1]*10)))
print('fsum求和:{}'.format(math.fsum([.1]*10)))
sum求和:0.9999999999999999
fsum求和:1.0
math.fabs(-3.14)
math.fabs(-3)
abs(-3.15)
abs(-3)
3.14

3.0

3.15

3

最大公约数,math.gcd

math.gcd(10,5)
##有单个0值的时候返回非零整数
math.gcd(4,0)
math.gcd(0,5)
##都为0返回0
math.gcd(0,0)
5

4

5

1

0

math.isclose,math.isfinite,math.isinf(x),math.isnan(x)

def jingdu(a,b,rel_tol,abs_tol):
    print('最大相对精度为{},绝对精度为{},abs(a-b)={},精度{}'.format(max([rel_tol*a,rel_tol*b]),abs_tol,math.fabs(a-b),'满足认为相近' if math.isclose(a,b,rel_tol=rel_tol,abs_tol=abs_tol) else '不满足认为不相近'))
jingdu(10,10.01,0.0001,0.001)
jingdu(10,10.01,0.0001,0.01)
jingdu(10,10.01,0.001,0.001)
最大相对精度为0.001001,绝对精度为0.001,abs(a-b)=0.009999999999999787,精度不满足认为不相近
最大相对精度为0.001001,绝对精度为0.01,abs(a-b)=0.009999999999999787,精度满足认为相近
最大相对精度为0.01001,绝对精度为0.001,abs(a-b)=0.009999999999999787,精度满足认为相近
math.isfinite(False)
math.isfinite(math.inf)
math.isfinite(math.nan)
math.isfinite(0)
True

False

False

True
math.isinf(math.inf)
math.isinf(False)
True

False
math.isnan(math.nan)
math.isnan(False)
True

False

分离整数和小数math.modf

math.modf(3.14)
(0.14000000000000012, 3.0)

求余数 math.remainder(x,y)

math.remainder(5,3)
math.remainder(3,5)
math.remainder(2,5)
math.remainder(10,math.inf)
-1.0

-2.0

2.0

10.0

去尾法求整 math.trunc

math.trunc(3.14)
3

exp,log,log2,log10,pow,sqrt

math.exp(3)
math.log(math.e)
math.log(2,2)
math.log2(math.e)
math.log10(10)
math.pow(2,3)
math.sqrt(16)
20.085536923187668

1.0

1.0

1.4426950408889634

1.0

8.0

4.0

random

取随机数

import random

.seed(),.getstate(),.setstate()

import random
random.seed(2)#设置随机数种子,相同的随机数种子下产生的随机数相同
random.getstate()#获取状态,返回一个捕获生成器当前内部状态的对象。可以传递给这个对象setstate()来恢复状态。
random.setstate(random.getstate())#状态应该从之前的调用中获得getstate(),并将 setstate()生成器的内部状态恢复到调用时的状态getstate()。
(3,
 (2147483648,
  279925189,
  2893088925,
  636135997,
  3019570967,
  24546326,
  1860774990,
  2256063250,
  4286297885,
  3456236285,
  3828254850,
  1904716859,
  2249539888,
  2294256870,
  2777468639,
  1349998930,
  3160784265,
  1225256972,
  1623886423,
  3193335063,
  1445156418,
  830208930,
  812658506,
  1344728592,
  3722463752,
  3299498912,
  3445105475,
  2929115884,
  3137932929,
  135156064,
  1843120409,
  2789881946,
  2411478582,
  3003603418,
  693539728,
  1050912668,
  2621505393,
  1482298779,
  4084130289,
  277836669,
  3219127066,
  4215122040,
  309282955,
  4057683373,
  1343888423,
  856187525,
  1291113795,
  1696475748,
  3325168865,
  1036436373,
  2408378201,
  2462024394,
  2978809697,
  3153518673,
  707931667,
  463384209,
  275568407,
  509936800,
  2419262004,
  3146271214,
  779696961,
  3419017276,
  4168215407,
  3027705354,
  1353452355,
  794645213,
  2100344468,
  3217965001,
  2516282486,
  2905552980,
  2405785668,
  3625364515,
  3941849319,
  3960676281,
  4171919258,
  402718959,
  1913828272,
  1105301682,
  3705208535,
  1085684525,
  1326640493,
  3700818611,
  337805347,
  398621460,
  3719657987,
  2746067504,
  2787714317,
  961082774,
  3584060392,
  2892850965,
  3003441634,
  1178977927,
  4080251279,
  3989025583,
  513709795,
  1876091663,
  2403147598,
  179283414,
  4001282840,
  31554818,
  891137156,
  3635576403,
  859131678,
  3471765469,
  296768679,
  341987293,
  1591684127,
  3148865036,
  267695159,
  1693112478,
  1675305243,
  3083975235,
  4212967543,
  136586706,
  4231140840,
  1114240159,
  2973984628,
  2428898623,
  626310867,
  815895436,
  3164659080,
  2284795055,
  1384352870,
  999514170,
  1258231796,
  2043772521,
  34860823,
  2423629098,
  110595825,
  3529449838,
  1544113456,
  817882994,
  2522345570,
  3100587289,
  1528092990,
  4291072830,
  3605167212,
  2422558087,
  2277658311,
  336603657,
  4249022207,
  626297312,
  628298112,
  3712691939,
  2917622652,
  3593186505,
  773651923,
  2218370920,
  1748572517,
  3661487907,
  3043882514,
  942669427,
  4215465336,
  3487178321,
  3482946337,
  1601249908,
  469597178,
  1818491115,
  80564289,
  2221862694,
  2216101671,
  4019241556,
  3674604594,
  2357131299,
  2992389838,
  732813758,
  947404084,
  2266480073,
  437047405,
  1875383540,
  3805400503,
  3552901963,
  2703925404,
  718967271,
  4051737087,
  3898916345,
  2840847890,
  2006706590,
  2609804162,
  2871278936,
  4189813876,
  2531596767,
  733114459,
  2092395850,
  4066940373,
  2922144346,
  8326138,
  3562185378,
  1628211718,
  2162762403,
  3818723621,
  3879409563,
  1968252583,
  2162668284,
  3066356526,
  1809089960,
  4108340113,
  282490136,
  2949529144,
  1940323897,
  1940200605,
  1878774970,
  1785179275,
  1656759234,
  3916984160,
  81879010,
  4250533656,
  3409007898,
  206634816,
  1415574839,
  3914221647,
  1535646930,
  1852362860,
  3779563010,
  2004064826,
  3329305049,
  193791403,
  2942537095,
  2412393864,
  2264400735,
  796018101,
  2127279618,
  3510875881,
  2891053688,
  1536630367,
  830556865,
  1938487543,
  2973515872,
  2875885233,
  2326476783,
  2380682517,
  352066180,
  1897062325,
  4071375369,
  3554851415,
  1194400779,
  4163953899,
  977841416,
  2550069388,
  2911538986,
  2090053422,
  165401569,
  3793122731,
  3742645833,
  2309810132,
  2356147667,
  3542982905,
  2033691678,
  1270108782,
  1158604068,
  1995821706,
  4187659899,
  4190466754,
  766650195,
  3032881065,
  2373810016,
  638928040,
  3848227135,
  2770821848,
  724343279,
  1460528927,
  4019603819,
  1938406370,
  2855668456,
  2335743307,
  2378381496,
  1147869714,
  2161876642,
  3227615774,
  3760991014,
  1573642799,
  1385437628,
  1249017785,
  1125000767,
  1817684589,
  2195515566,
  4175486934,
  1964615512,
  2778991034,
  2478240576,
  1922492705,
  2606175116,
  876746724,
  3781519656,
  3784007535,
  256114694,
  3113411354,
  1061742010,
  807914587,
  514185517,
  3541488655,
  1341022931,
  3495347199,
  1704556115,
  3078376128,
  163309404,
  514981036,
  2492763276,
  3770974649,
  1097652888,
  2708454729,
  456837495,
  1920856686,
  301214971,
  31184870,
  1949766651,
  2441459098,
  189439853,
  739856935,
  3520331847,
  3788773243,
  3166820007,
  337828826,
  1631579992,
  1550300092,
  48580235,
  2960613104,
  3608415135,
  1576604599,
  1586324428,
  2310666979,
  894504079,
  473950614,
  203095536,
  4164503157,
  1495628974,
  3732892462,
  2182973760,
  3020789253,
  2531952414,
  750471247,
  3093222635,
  372958735,
  1527672907,
  2975391482,
  2025298253,
  2113920247,
  4012858393,
  3020610381,
  4072283490,
  1104303097,
  3928455961,
  3274025787,
  2422905566,
  1446870279,
  2033502282,
  1154751487,
  3934856826,
  2229618828,
  3936540955,
  4200431068,
  1420734279,
  2362575667,
  782410481,
  2103513505,
  2786166650,
  3006573620,
  1425759089,
  2902378869,
  3585595507,
  682139375,
  2487635930,
  1775223026,
  230213479,
  3054377158,
  2942128189,
  608609324,
  1444617422,
  3462483062,
  1216643257,
  3384920070,
  1706684308,
  2257262314,
  2279534740,
  669389241,
  4079011584,
  1829175237,
  1986065849,
  3432604029,
  2324011638,
  1683014082,
  3203745988,
  4234947780,
  1061343275,
  2027033728,
  2492332535,
  1069486583,
  2997552985,
  823139251,
  2423935613,
  845226091,
  4142416987,
  1777785975,
  1027197356,
  217145583,
  3616462829,
  3357510694,
  2012962537,
  2561153328,
  3458070289,
  223716551,
  3245415105,
  2721998326,
  2296063826,
  2498978236,
  98190780,
  1161230560,
  162714006,
  1488819143,
  1587776552,
  4141082587,
  3117123308,
  1002595035,
  4056304345,
  4172840588,
  802145496,
  339083030,
  2052349063,
  3030507376,
  2004830125,
  318263239,
  2936832102,
  2824137892,
  1668640209,
  3195554732,
  1325076011,
  265015572,
  1210333973,
  3348105419,
  1871106170,
  598800538,
  396085150,
  2531414212,
  1973162893,
  428194342,
  792586457,
  793795123,
  1468913206,
  437809411,
  1981482574,
  954894943,
  1278628775,
  3880820604,
  2333252688,
  4187726558,
  4219648645,
  2239511190,
  482285113,
  2698130632,
  391675253,
  177656051,
  3405220797,
  274763961,
  3864733440,
  3607558740,
  2401745714,
  674308959,
  3156664729,
  1761454038,
  946279179,
  3471784765,
  2476334046,
  1043243098,
  3194322170,
  4169368284,
  2991049876,
  2842949521,
  2073239679,
  1998962611,
  440335225,
  1059592731,
  622995024,
  973127869,
  3246600424,
  130342971,
  3603362438,
  3312633039,
  3257359703,
  1970320682,
  1053367865,
  1936069442,
  3981626660,
  1206460077,
  503518641,
  4051830273,
  1043692261,
  3452655976,
  4054064567,
  1760719552,
  58127176,
  516937481,
  2545083253,
  2885240242,
  4001257230,
  2332870900,
  3856734519,
  3897510140,
  2281824596,
  6468565,
  3199626967,
  1059470054,
  343413685,
  1928034793,
  776414663,
  2091909390,
  2648595793,
  2575764583,
  987730076,
  666011272,
  1091176804,
  120227467,
  1672319774,
  1781257268,
  1080209204,
  2736397334,
  32183507,
  3355230493,
  4126762422,
  1131157144,
  1200672969,
  1448961183,
  3618297786,
  9488294,
  3998842055,
  2281836698,
  2422318934,
  357426703,
  1943340735,
  4073969204,
  3304058646,
  175011879,
  2728352098,
  103869720,
  1060758655,
  1214282351,
  1531604026,
  517890262,
  1681592764,
  3539311673,
  3881871097,
  3873775347,
  3615999596,
  160552549,
  148419949,
  4173241118,
  2318728374,
  204722481,
  81960074,
  2535567866,
  2736734275,
  3281640657,
  243742967,
  2464919329,
  2467408270,
  1709244339,
  3125340747,
  408462433,
  1220913936,
  2731658219,
  761663095,
  3523060552,
  1434001627,
  699491946,
  1433237907,
  3037659372,
  567873425,
  3094317138,
  2843359028,
  3453957991,
  4284736866,
  827827234,
  2677702491,
  3088358324,
  1430864864,
  772033361,
  1918840642,
  3011101684,
  3206300687,
  2265317890,
  3463030932,
  417153830,
  1575571934,
  2958285935,
  1622539381,
  188650516,
  3299719616,
  568009634,
  3787152651,
  1767241802,
  3664343362,
  3812349912,
  1803562288,
  2154267290,
  2281624473,
  4076796346,
  3038763409,
  717859959,
  3226180464,
  3097199637,
  1143177220,
  1569326525,
  1486200384,
  2957143652,
  1820847437,
  2118197908,
  736834565,
  459939171,
  483798042,
  2676883510,
  3521974415,
  155522317,
  2952819116,
  2230197974,
  4017917921,
  2977353850,
  1839004158,
  590796294,
  391857777,
  1845742827,
  280024913,
  1124921173,
  3938904076,
  2556821342,
  1117176787,
  624),
 None)
random.seed(5)#后面都会以5作为random seed
random.getrandbits(5)#返回一个占了指定k位数的整数
set([random.getrandbits(2) for i in range(1000)])#可以看到占了2个位的整数有0,1,2,3
19

{0, 1, 2, 3}

生成随机整数 .randrange(),.randint()

random.randrange(0,10,2)#random.randrange(start,stop,step),区别在于他可以限制步长
8
random.randint(0,10)#生成0到10之间的一个随机整数 a<=N<=b
9

生成随机序列 .random.choice(),random.choices(),random.shuffle(),random.sample()

  • random.choice(seq) 从一个非空序列中随机抽取一个数
random.choice(range(10))
5
  • random.choices(population,weights=None,*,cum_weights=None,k=1)
    • 给定weights或cum_weights,不能同时给,最终都会转为cum_weight来进行计算,长度必须和population的长度相同,对应的各个值的概率。
    • k决定了生成样本的个数
    • 大样本下各个值的概率应该与给定的weights相符
print('weights为[5,4,3,2,1]')
print('概率为[5/15={},4/15={},3/15={},2/15={},1/15={}]'.format(*[round((i)/15,2) for i in range(5,0,-1)]))
random.seed(5)
r=random.choices(range(5),weights=list(range(5,0,-1)),k=10000)
print('各随机值的概率为{},{},{},{},{}'.format(*[(i,round(r.count(i)/10000,2)) for i in set(r)]))
weights为[5,4,3,2,1]
概率为[5/15=0.33,4/15=0.27,3/15=0.2,2/15=0.13,1/15=0.07]
各随机值的概率为(0, 0.33),(1, 0.26),(2, 0.2),(3, 0.13),(4, 0.07)
  • random.shuffle 打乱原序列顺序,不生成新序列
  • 对于不可变序列,用sample(x, k=len(x))生成新顺序的序列
x=list(range(10))
print('原序列数据{}'.format(x))
random.shuffle(x)
print('打乱后的数据{}'.format(x))
原序列数据[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
打乱后的数据[0, 9, 2, 5, 3, 1, 6, 7, 8, 4]
  • random.sample(population,k) 从总体中随机抽出k个样本
random.sample(range(10000000), k=5)
[4300631, 3652645, 1013814, 3872536, 5408018]

生成符合随机分布的随机变量

函数 用法
random.random( ) 返回[0.0, 1.0) 范围内的下一个随机浮点数。
random.uniform(a,b) uniform(a,b),从均匀分布(a,b)内
random.triangular(低,高,模式)
random.betavariate(alpha,beta) 贝塔分布。参数的条件是alpha > 0beta > 0。返回值介于 0 和 1 之间。
random.expovariate(lambd) 指数分布。lambda是 1.0 除以所需的平均值。它应该是非零的。(该参数将被称为“拉姆达”,但是这是在Python保留字。)返回值的范围从0到正无穷大如果lambd为正,且从负无穷大到0,如果lambd为负。
random.gammavariate() 伽马分布。(不是伽马函数!)参数的条件是alpha > 0,beta > 0
random.gauss() 高斯分布。 mu是平均值,sigma是标准差。这比normalvariate()下面定义的函数稍快。
random.lognormvariate() 对数正态分布。如果您采用此分布的自然对数,您将得到一个具有均值mu和标准差sigma 的正态分布。 mu可以有任何值,并且sigma必须大于零。
random.normalvariate(mu,sigma) 正态分布。 mu是平均值,sigma是标准差。
random.vonmisesvariate(mu,kappa) mu是平均角度,以 0 到 2* pi之间的弧度表示,kappa 是浓度参数,必须大于或等于 0。如果 kappa等于 0,则该分布在 0 到 2* pi范围内减少为均匀的随机角度。
random.paretovariate(alpha) 帕累托分布。 alpha是形状参数。
random.weibullvariate(alpha,beta) 威布尔分布。 alpha是尺度参数,beta是形状参数。
random.gauss(0,1)
[random.gauss(0,1) for i in range(10000)]
-1.4219556534094393

[-0.6296761850269045,
 0.5954055838786159,
 0.9857334517874369,
 -0.3549387629051106,
 1.400282245346082,
 -1.624522797706792,
 -0.038566670902338646,
 -0.2348546010971189,
 0.4196765059159521,
 -1.4308659840926703,
 -0.9127451283569823,
 -0.4660219226024107,
 0.7734997373820144,
 -0.19126210790935477,
 -1.8293116403172052,
 -0.48337580247418954,
 -0.5697929220874937,
 1.0224123432817214,
 -0.4276364394586377,
 -0.992288384514242,
 1.1202037027599678,
 0.2860435751759315,
 -0.9571769749115264,
 0.4173702955157354,
 1.7576451763788725,
 0.4944037432017724,
 0.13227189810751905,
 0.2549933614250532,
 -1.8149332682761146,
 0.15645600191083806,
 0.31350079733344544,
 0.6419310561328584,
 -1.8427830153331641,
 -0.7594644933042584,
 0.9917616489574578,
 1.1656292508573851,
 -0.5348819083859369,
 -0.8483636400459912,
 -1.6328907106263157,
 -1.1294070824204796,
 0.2020187679528364,
 -0.1391306544491603,
 -0.43529070505305406,
 1.1001032064972636,
 -1.697074321325382,
 -0.6566171718290611,
 -0.5363420823221335,
 -1.4080659690669373,
 -1.8728267027683057,
 -1.3162863527793374,
 -1.1758154452886818,
 0.8142768730154252,
 -0.13381924210863175,
 -0.15112769887875319,
 1.7581454242561527,
 0.4468607341505275,
 -0.232552969504736,
 0.5618234719674982,
 1.8046731847823967,
 -0.0830438870783886,
 0.12026038594582772,
 -0.3191088253690801,
 0.5999448225733454,
 -0.5751589409270281,
 -0.7524507105355894,
 -0.09806028571309977,
 1.3582972833144324,
 -0.19773229911615242,
 -1.417537961326762,
 -0.3270727090722505,
 -0.4272531886483169,
 1.1334662718899389,
 -0.5071830170129044,
 -2.348790373418203,
 -0.49281508069205665,
 -0.10394078232319098,
 0.7560465671023359,
 -0.2972044128858333,
 -1.4257317214942429,
 -0.565941019253582,
 0.6939376992228531,
 -0.09222166984231943,
 0.002977481176397716,
 -1.3178493925589407,
 1.550239839993505,
 1.357207733293056,
 1.388931594681066,
 0.8863898419172855,
 -0.36393814758275084,
 -0.86263230979838,
 -0.4270880163939526,
 -1.088931658522788,
 0.19686597187356247,
 -1.617162527571611,
 1.182562725162606,
 -0.516270499267536,
 0.3107818278458872,
 1.054418930626885,
 -0.36432195618491653,
 0.07948979039790759,
 -0.930739534209166,
 -0.07583740964438193,
 0.9808424932390294,
 -0.5933518682943284,
 0.034940101891892714,
 -1.2930880422610038,
 -1.157004232769226,
 -0.027332983441034242,
 -0.5235588286009762,
 1.1507507940191568,
 -0.10670630851827113,
 -1.325226716233831,
 1.0476494991154073,
 -0.631940758835092,
 0.6031485642008568,
 0.5882172498797213,
 -0.16885298074701768,
 1.7340054516649417,
 0.840853749671336,
 -0.16994363479646948,
 -0.9433837798841451,
 -0.08926696516615626,
 -0.9155817355573838,
 -1.1262288602360206,
 -1.0824705002492496,
 1.975914890974318,
 -0.13208618396240152,
 -0.4554991058402445,
 -0.08734337000884299,
 -0.4244598463618883,
 -0.038328452006611315,
 -2.092087693939355,
 -1.0158427532345717,
 -0.5173197054193152,
 -1.054344016804034,
 -0.22544474874955395,
 -0.4915838792966391,
 -0.4731282144033474,
 -1.2402018885322732,
 -0.615506498240167,
 -1.1233679617877752,
 1.974183286884875,
 -0.0636624555444739,
 -1.3882959162611013,
 -0.16473677919357324,
 -1.3088076533774222,
 -2.266355764983697,
 0.5395865088847527,
 -0.17592222716504283,
 -0.769841534122228,
 0.753096494925958,
 -1.1759983268474736,
 -0.4824079558011068,
 0.25434276999259664,
 0.34324911751356946,
 0.4447665113990147,
 1.6927411067588853,
 1.0604564400465846,
 -0.529801230001186,
 0.687726387023265,
 -0.08236797634784064,
 0.8766547983096826,
 2.3655081215421014,
 0.1488293305302804,
 -0.4890610341615938,
 -0.810428789422391,
 0.014662746181770896,
 -1.905394289290576,
 0.12129972136928714,
 0.7035460082768401,
 -0.1665284704939521,
 0.40805651916735775,
 -2.148579948326666,
 -0.7134429771381017,
 -1.1341996562929044,
 -0.3036907265711348,
 -1.041713249184038,
 -1.0799292296111171,
 -0.6732515794028977,
 0.26513470652075416,
 -0.6013759862753371,
 1.2758932190069663,
 -1.033567900299831,
 0.23094357253821585,
 -0.5600766095484587,
 0.684604027202241,
 1.187203226585207,
 -0.3981578405142614,
 1.673594757864379,
 -0.2273198801949277,
 1.8191849342775637,
 0.8140974613932425,
 -2.8895660587510053,
 0.6641653392391034,
 -0.937103351484414,
 1.101936717714324,
 0.49036789326887475,
 0.28864721888251765,
 -2.354018846771389,
 0.8183282388906246,
 0.8669198831438127,
 1.7734228884716665,
 0.3594209711867724,
 -0.9087819981584492,
 1.931158700484321,
 1.017122992123256,
 -0.016396139619342186,
 0.22230774869973385,
 0.922174229677968,
 0.3549129625665895,
 -0.5925832331034301,
 -0.4787758381335803,
 0.14568325912688657,
 -0.9854791381481198,
 -0.1576726761794055,
 1.4175284313948935,
 1.7663237514815295,
 -0.7211662492988873,
 -1.0496605907702794,
 0.5358505149073243,
 0.7875263916014955,
 -0.9490732292857235,
 -1.735439956220406,
 1.637160182156923,
 0.6254591895700219,
 -0.9595976690845289,
 1.4901815975419908,
 -0.4158414044371797,
 -0.47014029643928007,
 -0.5783077445730167,
 1.0301289530122686,
 -1.550239357148907,
 -0.4383601256504679,
 0.21886395745003268,
 -2.2544159438208022,
 1.1409376212051305,
 -0.572148000951263,
 1.194526329820844,
 -1.1537407286689052,
 -0.326200929656801,
 -0.4884488269077922,
 -1.1969988240467266,
 -0.4889917910537162,
 -0.026210928626727425,
 2.3331710620982697,
 1.1714767392689083,
 0.17262345353103312,
 1.9498486314790322,
 0.8327537017436206,
 -0.9849449265779187,
 0.5273237375259369,
 0.2831695152922225,
 0.6397824472325156,
 -2.635499834020743,
 0.8134471016299212,
 0.7578849477973637,
 -0.4351420865338775,
 1.1804374498862626,
 -1.005405333585896,
 0.4847362569149137,
 0.9021000491209837,
 1.4178586384396974,
 -0.23730867836213004,
 0.43354486842408585,
 -1.683730289721739,
 -0.9665348533039793,
 0.8057997505164401,
 1.7665497820164555,
 0.2552746474274279,
 0.6171142461378634,
 1.2500433791261318,
 -1.523105936478965,
 -1.0385470548951055,
 -0.5005797530030457,
 0.06174959349893491,
 -0.553454759153265,
 -0.636431871423251,
 0.03091051601164856,
 -0.5752885930078575,
 -0.8134078548395016,
 -0.6439391520987918,
 -1.740730988609173,
 -1.2879825042849498,
 -0.01976566714603804,
 0.61515667487295,
 -0.18663923383354575,
 -0.8217404052707674,
 1.8831950769730712,
 0.008914626402507746,
 -0.14431720839781625,
 0.6484063918913433,
 1.8722933494201273,
 0.8408968904703545,
 1.5240341888100242,
 0.5029153756156086,
 -0.44374521782583903,
 -0.9856047786857068,
 0.483843312169038,
 1.8013435504320718,
 0.3599005221324453,
 -1.1816617038861306,
 1.330504621043916,
 -0.10253830580070207,
 0.5216108395880764,
 -1.322135519248716,
 0.45595903631947243,
 1.2006247589185735,
 1.9427292089630241,
 -1.5004330301577578,
 1.0191901051100336,
 1.2108528464611872,
 -1.416210767659464,
 -0.17993742177599145,
 -1.7101874883709391,
 1.054479225589809,
 -1.167115236934017,
 1.0902375238020514,
 -0.6709476245043602,
 0.8552203135928729,
 -1.910482082439587,
 -1.2934446190063957,
 -0.4007440624791746,
 0.15898843998745915,
 -0.0997353910962296,
 0.7889924079149742,
 1.0361524908009747,
 -0.09285921333638554,
 -0.028599853726641557,
 0.9818157783920358,
 1.3503431654833618,
 0.007569809627780271,
 -0.3473923173318178,
 -0.4830845708976994,
 0.3925858103356768,
 1.4001451056880534,
 0.13435392285680917,
 0.028814428523282955,
 0.052524223801298585,
 -0.3342706979488257,
 0.5465459825987818,
 -0.6725825566768234,
 -1.1234471141621465,
 -0.3417153676023296,
 1.219128723668354,
 -0.5049774158617306,
 1.092546121850652,
 1.3631142070828843,
 0.5956944032477143,
 2.549594425497578,
 -0.25505030449339816,
 0.8803974405332823,
 -1.4050420260834733,
 0.40138381865342476,
 -0.30211532247328887,
 0.5662368875714021,
 -0.5374168971289651,
 1.748359108169909,
 -1.2586259088751877,
 1.3399416415058314,
 0.21486950794811854,
 0.606470965280977,
 -0.20507726327738357,
 -0.6148813721489511,
 1.8142896249927174,
 -0.6547375865817215,
 -1.044033158387067,
 -0.35775673719607826,
 0.9270178794906496,
 0.6970674816135564,
 -0.08908091038023244,
 -0.7358111523265262,
 0.12292949295246536,
 -0.6969896041787729,
 2.4514550196590634,
 0.8121270585368683,
 1.2078809057795092,
 -1.3611545707291883,
 1.7490105594132777,
 -1.6538432638953338,
 -1.0937153592040623,
 0.43727351965130035,
 -0.8357844171188207,
 -0.5830884713608321,
 -0.34510648339895805,
 0.2090328982382316,
 1.898183983302367,
 1.4080633234635478,
 -1.4100347334882588,
 -0.8611405528592826,
 0.0698344288197979,
 -1.0576208594232845,
 -0.23764007535294304,
 1.783049655634505,
 -1.5265227914202233,
 -0.7627444874729881,
 0.19638786455885557,
 0.39645374189180554,
 -0.7883550049372307,
 0.8568116164646791,
 0.1844297853997373,
 -0.5712971636047339,
 0.9386745222712621,
 0.6765648857637485,
 1.4243689592893072,
 0.7837781906618652,
 0.29429987522535883,
 -1.1967007877747762,
 0.5378992309337658,
 0.616488313348524,
 -0.4884025944250402,
 -0.9740113473967759,
 -0.44200498284978573,
 -0.15138787406921547,
 1.3688795302672399,
 0.4715162538125438,
 -2.800676618251924,
 0.16950227512777255,
 -0.033055924913131286,
 -0.288826553693011,
 -0.7647850221180329,
 -0.31689238657171576,
 -1.4720848117523064,
 0.2509451575030368,
 3.029223265081715,
 1.0864817252209484,
 -0.8500946708582894,
 -0.7883517921168798,
 -1.6271350240105802,
 0.4160455319155022,
 -0.6310505594602039,
 -0.06186084972006378,
 -1.2848010379792085,
 2.3896535807628925,
 1.3615209170604106,
 -0.12919438164973032,
 0.7857754465151577,
 -0.5126735635517892,
 -0.4907351013700639,
 0.7414813068902621,
 1.8778042473890937,
 -1.2458575800178175,
 -0.17666114431166788,
 -0.2559544492096509,
 -0.06307965004051704,
 1.1159499213341946,
 -0.6505065348543807,
 -2.2292948617476442,
 0.5792901058289257,
 -1.172075255876445,
 -1.7369570056443582,
 -0.1369047496310767,
 0.6984584000278161,
 0.4808475221086058,
 0.3006816159736127,
 1.409899963051246,
 -1.0939668008162122,
 0.06952269248035388,
 1.7144038823232273,
 -1.5342913438124297,
 0.9432318856686204,
 -0.5811483412319801,
 -0.04375691691203355,
 0.7216865854263415,
 -0.8448248744423664,
 -0.8109337821711362,
 -1.028906566692601,
 -0.48900330182851665,
 -0.45014651115208726,
 -0.022659494729069623,
 -1.471777651828464,
 0.012701186437927052,
 0.6224998575179364,
 -0.5296849891184346,
 -1.0196206363329796,
 -0.9450874328752605,
 -1.4387857902194618,
 0.5392766635345327,
 0.35312576014431796,
 -0.3450535768221113,
 -0.2079541030291691,
 -0.42694814597028197,
 1.7943012861258538,
 0.19842183867870042,
 0.7187886914227447,
 0.00674403783932732,
 -0.718115780877205,
 -1.0289559809704838,
 0.25863237688164664,
 -1.3540359192878035,
 0.018689801816718334,
 0.4414115975863131,
 0.7805161182376369,
 0.5426342062342383,
 -0.7951865989866499,
 2.6851475457321365,
 -1.4506403196826538,
 0.8367937133719945,
 1.7399563504879159,
 -0.18508220510304987,
 -0.3132624778972783,
 -1.0126786019067613,
 -0.9532416286000844,
 0.8715839756008555,
 1.2614906735776368,
 0.37250577497124193,
 -0.6258345515808477,
 0.27972224247486566,
 -1.4962461339894435,
 0.5400580211917891,
 0.8834185494731329,
 -2.1678428636646085,
 -0.6484386522975657,
 0.30023047926116114,
 -0.0187770876630591,
 -2.1229529830039797,
 0.7295816774337417,
 -0.7492574545584496,
 1.1258193659054703,
 2.2640034850148063,
 0.21136617497164895,
 0.300681191198349,
 0.052679324290871195,
 -0.35754796396618743,
 0.3354547612151761,
 -1.8523650654779567,
 -1.4771353974457107,
 1.0641251025287566,
 -0.6076825820084633,
 -0.7965315863376566,
 1.1778823190175598,
 0.10422580691724645,
 -2.0864996709626786,
 -0.36039992783171976,
 -0.572394308073357,
 0.7878673518744297,
 -0.7414536710532137,
 -0.4958650073807373,
 -0.12660756080824634,
 -0.2547554296584578,
 0.4136760361965501,
 -1.5994536763184721,
 0.5116430710792614,
 0.3756456156328341,
 -1.5609663362677069,
 0.4983278352881628,
 0.26644014662126336,
 0.9190475157539979,
 -0.08815865594377201,
 -1.3909134526828941,
 -0.2017812409567816,
 -0.5546485541740693,
 0.48356658405839054,
 -0.06920182796462337,
 -0.22202563406280298,
 0.458465436843133,
 0.8089794735389483,
 -0.9271472644506186,
 0.2674978614582061,
 0.2348187238012788,
 -1.682776088821256,
 -0.7510843759942639,
 -1.7465848578989995,
 1.1022344963679984,
 -0.997234793433654,
 -0.4822750909188576,
 1.4613104159614354,
 -0.18579415497159213,
 -2.3968078736260496,
 2.538935924953969,
 -0.751531478877422,
 -0.6694982101503868,
 0.27861023729606554,
 0.2947975826821727,
 1.9561847305231457,
 0.7058486306965432,
 1.330428946499378,
 -0.14813633416812824,
 -0.33688971095496956,
 -1.5305978875695818,
 0.17279561388333936,
 0.9740489313636183,
 0.38661489351690626,
 -0.3755647893017307,
 1.2866948400875504,
 0.43879724801114955,
 -0.8791798069502345,
 0.3336156458673428,
 -1.063470191088493,
 -0.033944028665747965,
 -0.4374704580895674,
 -1.523977715863948,
 -0.6758941303441116,
 1.7549633386580403,
 0.9178976069395787,
 1.1073269996775397,
 -2.4857300941144786,
 0.2733043713621421,
 0.9161393902293468,
 0.2705568148935386,
 -0.22833034905737223,
 -1.9439751602878688,
 -0.5738065480955866,
 -0.3735641593131018,
 -1.0980589120181945,
 -2.648841891578441,
 -0.22924096908862387,
 -0.24261381355101008,
 0.21751642750264566,
 0.9742643607874117,
 0.6991226136728111,
 0.6679962205513593,
 -2.467301476334916,
 -0.256890878051971,
 -0.015471920658248069,
 -0.25437881108349325,
 1.0932278559189235,
 -0.3638541145474228,
 -1.2160300606103258,
 -0.434395505253294,
 0.24912742201680543,
 -0.2787132585497293,
 0.3596896951255847,
 0.06913313509288688,
 -1.0527077116559411,
 2.4080298895988443,
 1.2890191622194125,
 0.028761942411470162,
 0.9991578845112536,
 -1.3531752046013183,
 0.6113569967861116,
 -0.676550859091841,
 0.49384486179806686,
 -1.834672752962718,
 0.22173942065597121,
 -2.56435162927382,
 0.7927628018170152,
 -0.09870917577884755,
 1.6359775575640711,
 1.7347713083053873,
 0.623521442524678,
 1.0649202216884772,
 -0.6161649262777091,
 0.49250040949191454,
 2.1707349112164707,
 1.6682976993226943,
 0.7931892604093993,
 0.21274751819032167,
 -0.024652470747056808,
 0.021810057050931538,
 -0.3878059742534203,
 1.1238238647211174,
 1.2953014759938732,
 0.13472796859820943,
 -0.3115066214425307,
 1.442615568404904,
 0.23778872372311022,
 0.02274976416778007,
 0.7511752348500887,
 -0.24204843007313767,
 -0.15582281850497964,
 -1.157536139046821,
 -0.12694453196343794,
 0.07929878627809883,
 -1.5565683912617958,
 0.7484688067394636,
 0.1623876447400544,
 0.46054468619848066,
 0.8603473559864379,
 0.650552095549752,
 1.6790381925972404,
 1.6341199345378359,
 -1.6397158839081,
 0.7497977990099922,
 0.09905972482117159,
 1.1835739527075748,
 0.27462989315258535,
 -0.019860064066611966,
 -0.2807048268704936,
 -0.21485898734515352,
 -0.8917261180817437,
 -0.021671106901488456,
 1.8946021888061118,
 -0.44264613538957515,
 0.40242524874352287,
 -1.1104567185141345,
 0.36935290401847826,
 1.267352314734331,
 1.358535143257013,
 -1.9048473392482064,
 -1.298710076356032,
 -1.1349269881819077,
 1.203675351390327,
 0.10837733551470614,
 -1.5975089832431901,
 0.8786565942308892,
 1.046458992848431,
 -0.44278664261058237,
 1.9308878340999853,
 0.4173755036659957,
 -1.8091383671670231,
 1.1317938359746917,
 -0.28258469613135284,
 -0.4191272952888748,
 -0.19557113024818762,
 0.6357515533739064,
 0.10125166796267238,
 0.10902043146339194,
 0.3676251546559775,
 0.09988680391735559,
 1.259413813356031,
 -0.33410801637603393,
 1.0781130821015181,
 1.8773793727252075,
 0.27890627495166065,
 0.22727103814080424,
 -0.30149937984539105,
 0.5437879848186945,
 0.08138726664722233,
 -0.5234030359646918,
 0.05547998112975831,
 1.8276754236051844,
 0.24502068605226365,
 -0.5655939505940629,
 1.3539012048879844,
 0.19376142881673744,
 -0.6032906185616236,
 -1.4126903378033833,
 -0.7115042013636114,
 0.6016331193878873,
 2.183115099739467,
 -0.7018651805587843,
 0.6442587824631485,
 -0.3106071351519599,
 0.7066384173392374,
 0.6246198232703938,
 1.1149017687842684,
 -0.15224911484084597,
 1.5246803061444747,
 -1.1815635024414142,
 -1.3354915662408,
 -0.2083462297394671,
 1.0777768018689307,
 -0.8688845126391131,
 -0.427401108492367,
 -1.992238322479961,
 0.9457561741179215,
 -0.9710873245309282,
 0.9048140782347975,
 0.2531608404761295,
 -0.2051884055974629,
 -0.8938941964853045,
 -1.2133780716777307,
 0.42306778711780013,
 -0.2992925451074128,
 -0.5655765225927392,
 -0.9853423800536103,
 0.9214968472316474,
 0.6417999790295804,
 0.6005287301271321,
 1.252350105698771,
 0.5761631072903887,
 -0.7793284698339792,
 -0.0028448978886113727,
 -0.6249509002183818,
 0.6942690921780934,
 -0.5912146183219535,
 -0.909266955550466,
 -0.4209081851071685,
 1.3437254460247332,
 -0.47589888560898064,
 0.19594529677295414,
 -0.41599345333438315,
 -0.9520965379561305,
 -0.2168984480760886,
 1.3891986872541606,
 0.2618931390325614,
 -0.5430265915583335,
 0.3466535390729279,
 1.396620829736766,
 0.8120968302701589,
 0.19589713652034463,
 -1.900249648647964,
 0.18444192353017136,
 0.88267094915725,
 0.001975997297237487,
 0.36458632869605356,
 -3.142474545368474,
 0.6181913445070436,
 -0.270449995581488,
 -0.7802303311662869,
 -1.877004804298071,
 0.5763084699536877,
 0.5032331109893586,
 -0.22513647266533915,
 -0.4315037175181532,
 -1.2782823493000612,
 0.5534314047412151,
 -0.9030110468765645,
 0.928719106242044,
 0.48730624634752867,
 0.8578972240455291,
 -0.08811674873139629,
 -0.0841725938676765,
 -1.8838359058274974,
 -0.9917089732655245,
 -0.45717234505487647,
 -0.38003250135650035,
 1.5059448376419744,
 -0.8934410708594785,
 -0.9703402599120479,
 -0.18945736514231382,
 -2.322555409412749,
 -0.1470062704984694,
 0.6532498330855238,
 1.2934591869541858,
 -2.4343256929945083,
 -1.2265337990783338,
 1.2256536324175875,
 -2.2983257463453914,
 -0.7027845939928999,
 -0.5026186281810318,
 1.0436035088553304,
 -0.1833538923388108,
 -1.536732906688041,
 -0.30842950593959595,
 1.4423856609017993,
 -1.0788878498854684,
 -0.47688883581992675,
 2.2903158509218113,
 0.9029693843806126,
 -0.5430058325985939,
 1.6487979705760596,
 -0.9322159364147232,
 -0.43458772566648507,
 -0.16667555900469075,
 -0.4594781323174587,
 -0.4792894137985642,
 0.050388050222937616,
 -0.6393269666840532,
 -0.5823978384283172,
 1.0253979844395842,
 0.561403395249828,
 0.2405132871761964,
 0.6624659658559158,
 -0.7865998995601851,
 0.5191666890111751,
 2.199260654628014,
 -1.8737950664155594,
 -2.0564721303122124,
 1.9666779107392531,
 -0.29026568602621716,
 -0.5376779861774817,
 -1.2483127336300979,
 0.9143153738440081,
 0.6086073543647734,
 -0.5767840391339853,
 1.1375312524045171,
 1.0629875935881221,
 2.807953098280353,
 0.04292226769132251,
 1.49151441005822,
 0.7604645320137748,
 2.0839185377407334,
 -0.4652318469203409,
 -0.8390816445235721,
 1.2191860785428021,
 -0.8719450827927185,
 -0.3451892059132955,
 1.6949502224871011,
 -0.3380283416061746,
 0.6614496067569441,
 -0.8883756628519891,
 1.1960304482774864,
 -0.18717643675334406,
 0.09717838556733881,
 -0.5775702108889591,
 1.3071218900591388,
 0.04339007671745336,
 -0.038118572704603434,
 -0.3584908178481061,
 -0.09607198081603684,
 -0.006696342454642689,
 0.7721025146255348,
 0.5854607898779437,
 0.570054089697152,
 0.5531446992124376,
 -0.5626017873740172,
 -0.9288625774553657,
 0.6581057457753348,
 -0.21743197009130716,
 -2.462170235279334,
 -0.04160373411322762,
 -0.828250857181522,
 0.5370986097436874,
 -1.0311470174862776,
 0.30002028643666767,
 -0.8078606776445915,
 -1.0836630235406433,
 -0.8633620784653816,
 -0.31396135270163944,
 0.581917138426367,
 1.0201163851417148,
 -0.039999386145649886,
 -1.2979808498759509,
 0.851201868055485,
 0.027169735322276165,
 0.8003398214625412,
 -0.5170067743462894,
 0.5290281917344405,
 0.48919336257201373,
 -0.7297948158810518,
 -0.5682879864472404,
 -0.9026536805346195,
 -1.3228088238748248,
 -0.5251490620262973,
 0.08171752272949241,
 -0.3641107117167964,
 -1.3726585884546902,
 -0.6731843636920071,
 -0.33429144846997044,
 0.6310406031397857,
 -2.0312025774712574,
 0.6124293282506833,
 -0.7224650096648784,
 -0.22174862306608104,
 1.7594570030757806,
 -2.4393085980344367,
 1.2528036559686688,
 0.16756376305728693,
 -0.1497828428929601,
 0.4652466829252751,
 0.09327381247005198,
 0.25965676092484624,
 0.7956615632120638,
 0.44751962019661473,
 1.056391360929353,
 -0.23790474082030993,
 0.1489861910816149,
 -0.5229522354156243,
 0.8049936520566376,
 0.3674280485410104,
 0.520181971156079,
 -1.1002777088287372,
 0.8148419913102779,
 -0.031523922358815674,
 0.6638919386209188,
 0.18779124239174178,
 -1.4050872046695193,
 1.3715368150145377,
 0.24626419195455065,
 -0.24442592527087179,
 -0.14446624251898957,
 1.7800489657569645,
 1.7340318618028236,
 0.458778993874631,
 1.0906071024980568,
 0.5247233912538234,
 0.7574185147960836,
 0.4551935636162473,
 -0.3751400234429702,
 1.734250254193333,
 0.6365728245380442,
 0.35526554168923824,
 -0.4196206802304722,
 -0.026361994052221612,
 1.6492387177949235,
 0.021314180300315816,
 1.228206058829648,
 0.6851554811689623,
 1.5989390044664664,
 -0.7920385402988698,
 -0.807615175913103,
 -1.563695918948092,
 -2.5628111390941224,
 0.9058091772883164,
 -1.6985884651992589,
 0.425559733028098,
 0.7508512192731484,
 -0.8541933272873897,
 -0.1637149132401729,
 -1.5721765749231746,
 -1.0630555677419333,
 -0.6530167316562067,
 0.2845924116374752,
 0.061243568815830714,
 0.022943763305544516,
 -0.0817307010095704,
 -1.325963457559799,
 -0.3626161985268869,
 -0.36525656727613376,
 1.806803877393456,
 -0.1071994685118589,
 -0.057420358847203166,
 0.47122242408678333,
 0.20916220474249236,
 -0.23374951658530146,
 0.5459638701521142,
 0.8836332516983,
 -0.9011653297232214,
 0.22687705520552537,
 ...]

Alternative Generator

class random.Random([seed]):实现模块使用的默认伪随机数生成器的类 random

class random.SystemRandom([seed]):使用从操作系统提供的源生成随机数的函数的类。并非在所有系统上都可用。不依赖软件状态,序列不可重现。相应地,该方法没有效果并且被忽略。如果被调用,和方法会引发 。

访问互联网

处理从 urls 接收的数据的 urllib.request

日期和时间

datetime

import datetime

模块中包含的类

类名 实例对象与解释
datetime.date(year,month,day) datetime.date(2021,11,26) 日期类,包含年月日信息
datetime.time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) datetime.time(),时间类,包含小时,分钟,秒,微秒,时区信息
datetime.datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]]) 既包含日期,也包含时间
datetime.timedelta() timedelta类是用来计算二个datetime对象的差值的。
datetime.tzinfo() 时区信息对象

datetime.date

datetime.date(year,month,day)
属性和方法 介绍
.day,.month,.year 天,月,年
.isocalendar() 返回一个包含三个值的元组,三个值依次为:year年份,week number周数,weekday星期数(周一为1…周日为7)
.isoformat(…) 返回符合ISO 8601标准 (YYYY-MM-DD) 的日期字符串
.isoweekday(…) 返回符合ISO标准的指定日期所在的星期数(周一为1…周日为7)
.weekday(…) 与.isoweekday(…)相似的还有一个weekday(…)方法,返回的周一为 0, 周日为 6
.timetuple(…) 该方法为了兼容time.localtime(…)返回一个类型为time.struct_time的数组,但有关时间的部分元素值为0
.toordinal(…) 返回公元公历开始到现在的天数。公元1年1月1日为1
.replace(…) 返回一个替换指定日期字段的新date对象。参数3个可选参数,分别为year,month,day。注意替换是产生新对象,不影响原date对象。
.resolution date对象表示日期的最小单位。这里是天。
.fromordinal(…) 将Gregorian日历时间转换为date对象;Gregorian Calendar :一种日历表示方法,类似于我国的农历,西方国家使用比较多。
.fromtimestamp(…) 根据给定的时间戮,返回一个date对象
.today(…) 返回当前日期
.max date类能表示的最大的年、月、日的数值
.min date类能表示的最小的年、月、日的数值
import pandas as pd
def date_atr_and_met(year,month,day):
    import datetime
    date=datetime.date(year,month,day)
    atr=[i for i in dir(date) if i[0]!='_']
    l=[]
    for i in atr:
        try:
            a=eval('date.'+i+'()')
        except:
            try:
                a=eval('date.'+i)
            except:
                a="pass"
        l.append(['.'+i,a])
    return l
pd.DataFrame(date_atr_and_met(2021,11,26),columns=['方法或属性','实例'])    

方法或属性 实例
0 .ctime Fri Nov 26 00:00:00 2021
1 .day 26
2 .fromisoformat <built-in method fromisoformat of type object ...
3 .fromordinal <built-in method fromordinal of type object at...
4 .fromtimestamp <built-in method fromtimestamp of type object ...
5 .isocalendar (2021, 47, 5)
6 .isoformat 2021-11-26
7 .isoweekday 5
8 .max 9999-12-31
9 .min 0001-01-01
10 .month 11
11 .replace 2021-11-26
12 .resolution 1 day, 0:00:00
13 .strftime <built-in method strftime of datetime.date obj...
14 .timetuple (2021, 11, 26, 0, 0, 0, 4, 330, -1)
15 .today 2021-11-26
16 .toordinal 738120
17 .weekday 4
18 .year 2021

datetime.time

datetime.time(\[hour[, minute[, second[, microsecond[, tzinfo]]]]\])
def time_atr_and_met(hour,minute,second):
    import datetime
    time1=datetime.time(hour,minute,second)
    atr=[i for i in dir(time1) if i[0]!='_']
    l=[]
    for i in atr:
        try:
            a=eval('time1.'+i+'()')
        except:
            try:
                a=eval('time1.'+i)
            except:
                a="pass"
        l.append(['.'+i,a])
    return l
pd.DataFrame(time_atr_and_met(15,42,30),columns=['方法或属性','实例'])    

方法或属性 实例
0 .dst None
1 .fold 0
2 .fromisoformat <built-in method fromisoformat of type object ...
3 .hour 15
4 .isoformat 15:42:30
5 .max 23:59:59.999999
6 .microsecond 0
7 .min 00:00:00
8 .minute 42
9 .replace 15:42:30
10 .resolution 0:00:00.000001
11 .second 30
12 .strftime <built-in method strftime of datetime.time obj...
13 .tzinfo None
14 .tzname None
15 .utcoffset None

datetime.datetime

datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])

def datetime_atr_and_met(year,month,day,hour,minute,second):
    import datetime
    datetime1=datetime.datetime(year,month,day,hour,minute,second)
    atr=[i for i in dir(datetime1) if i[0]!='_']
    l=[]
    for i in atr:
        try:
            a=eval('datetime1.'+i+'()')
        except:
            try:
                a=eval('datetime1.'+i)
            except:
                a="pass"
        l.append(['.'+i,a])
    return l
dt=datetime_atr_and_met(2021,11,26,16,0,0) 
ndt=[i+j for i,j in zip(dt[20:39],dt[:19])]+[dt[19]+['']+['']]
pd.DataFrame(ndt,columns=['方法或属性','实例','方法或属性','实例'])

方法或属性 实例 方法或属性 实例
0 .replace 2021-11-26 16:00:00 .astimezone 2021-11-26 16:00:00+08:00
1 .resolution 0:00:00.000001 .combine <built-in method combine of type object at 0x0...
2 .second 0 .ctime Fri Nov 26 16:00:00 2021
3 .strftime <built-in method strftime of datetime.datetime... .date 2021-11-26
4 .strptime <built-in method strptime of type object at 0x... .day 26
5 .time 16:00:00 .dst None
6 .timestamp 1637913600.0 .fold 0
7 .timetuple (2021, 11, 26, 16, 0, 0, 4, 330, -1) .fromisoformat <built-in method fromisoformat of type object ...
8 .timetz 16:00:00 .fromordinal <built-in method fromordinal of type object at...
9 .today 2021-11-26 16:12:50.397239 .fromtimestamp <built-in method fromtimestamp of type object ...
10 .toordinal 738120 .hour 16
11 .tzinfo None .isocalendar (2021, 47, 5)
12 .tzname None .isoformat 2021-11-26T16:00:00
13 .utcfromtimestamp <built-in method utcfromtimestamp of type obje... .isoweekday 5
14 .utcnow 2021-11-26 08:12:50.397239 .max 9999-12-31 23:59:59.999999
15 .utcoffset None .microsecond 0
16 .utctimetuple (2021, 11, 26, 16, 0, 0, 4, 330, 0) .min 0001-01-01 00:00:00
17 .weekday 4 .minute 0
18 .year 2021 .month 11
19 .now 2021-11-26 16:12:50.396240

datetime.timedelta

timedelta类是用来计算二个datetime对象的差值的。

创建对象:datetime.timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)

返回对象实例:datetime.timedelta(days=, seconds=, microseconds=)

使用timedelta你可以很容易地算出前几天和后几天的时刻。

a=datetime.datetime.now()
b=datetime.datetime.now()
a-b
print(a-b)
datetime.timedelta(0)

0:00:00
datetime.timedelta(1,1,1)#
datetime.timedelta(days=1, seconds=1, microseconds=1)
from datetime import datetime, timedelta
now = datetime.now()
now + timedelta(hours=10)
now - timedelta(days=1)
now + timedelta(days=2, hours=12)
datetime.datetime(2021, 11, 27, 3, 50, 0, 384591)

datetime.datetime(2021, 11, 25, 17, 50, 0, 384591)

datetime.datetime(2021, 11, 29, 5, 50, 0, 384591)
def timedelta_atr_and_met(days,seconds,microseconds):
    import datetime
    timedelta=datetime.timedelta(days,seconds,microseconds)
    atr=[i for i in dir(timedelta) if i[0]!='_']
    l=[]
    for i in atr:
        try:
            a=eval('timedelta.'+i+'()')
        except:
            try:
                a=eval('timedelta.'+i)
            except:
                a="pass"
        l.append(['.'+i,a])
    return l
pd.DataFrame(timedelta_atr_and_met(2,42,300),columns=['方法或属性','实例'])    

方法或属性 实例
0 .days 2
1 .max 999999999 days, 23:59:59.999999
2 .microseconds 300
3 .min -999999999 days, 0:00:00
4 .resolution 0:00:00.000001
5 .seconds 42
6 .total_seconds 172842.0003

datetime.timezone

创建时区

The timezone class is a subclass of tzinfo, each instance of which represents a timezone defined by a fixed offset from UTC. timezone类时tzinfo类的子类,每一个实例对象代表了与utc时间的固定偏移

Objects of this class cannot be used to represent timezone information in the locations where different offsets are used in different days of the year or where historical changes have been made to civil time.

  • class datetime.timezone(offset, name=None)

The offset argument must be specified as a timedelta object representing the difference between the local time and UTC. It must be strictly between -timedelta(hours=24) and timedelta(hours=24), otherwise ValueError is raised.

offset必须是一个timedelta对象,代表了与utc时间的偏移,范围为-timedelta(hours=24) 到 timedelta(hours=24)

The name argument is optional. If specified it must be a string that will be used as the value returned by the datetime.tzname() method.

name可以不给,给了话必须是datetime.tzname()生成的对象

Changed in version 3.7: The UTC offset is not restricted to a whole number of minutes.

  • timezone.utcoffset(dt)

    Return the fixed value specified when the timezone instance is constructed.

    当实例对象被创建后,返回固定值

The dt argument is ignored. The return value is a timedelta instance equal to the difference between the local time and UTC.

dt参数被忽略,返回值是一个timedelta对象,表示utc时间与本地时间的offset

Changed in version 3.7: The UTC offset is not restricted to a whole number of minutes.

  • timezone.tzname(dt)

    Return the fixed value specified when the timezone instance is constructed.

If name is not provided in the constructor, the name returned by tzname(dt) is generated from the value of the offset as follows. If offset is timedelta(0), the name is “UTC”, otherwise it is a string in the format UTC±HH:MM, where ± is the sign of offset, HH and MM are two digits of offset.hours and offset.minutes respectively.

Changed in version 3.6: Name generated from offset=timedelta(0) is now plain ‘UTC’, not ‘UTC+00:00’.

from datetime import datetime, timedelta, timezone
dt=datetime.now()
tz=timezone(timedelta(hours=6))
tz
tz.tzname(dt)
tz.utc
tz.utcoffset(dt)
datetime.timezone(datetime.timedelta(seconds=21600))

'UTC+06:00'

datetime.timezone.utc

datetime.timedelta(seconds=21600)

时区的转换

  • 时区转换的关键在于,拿到一个datetime时,要获知其正确的时区,然后强制设置时区,作为基准时间。

    利用带时区的datetime,通过astimezone()方法,可以转换到任意时区。

    不是必须从UTC+0:00时区转换到其他时区,任何带时区的datetime都可以正确转换,例如上述bj_dt到tokyo_dt的转换。

  • 我们可以先通过utcnow()拿到当前的UTC时间,再转换为任意时区的时间

## 拿到UTC时间,并强制设置时区为UTC+0:00:
>>> utc_dt = datetime.utcnow()#并没有时区信息
>>> print(utc_dt)
>>> utc_dt = datetime.utcnow().replace(tzinfo=timezone.utc)
>>> print(utc_dt)
## astimezone()将转换时区为北京时间:
>>> bj_dt = utc_dt.astimezone(timezone(timedelta(hours=8)))
>>> print(bj_dt)
## astimezone()将转换时区为东京时间:
>>> tokyo_dt = utc_dt.astimezone(timezone(timedelta(hours=9)))
>>> print(tokyo_dt)
## astimezone()将bj_dt转换时区为东京时间:
>>> tokyo_dt2 = bj_dt.astimezone(timezone(timedelta(hours=9)))
>>> print(tokyo_dt2)
2021-11-26 10:56:22.270815
2021-11-26 10:56:22.271814+00:00
2021-11-26 18:56:22.271814+08:00
2021-11-26 19:56:22.271814+09:00
2021-11-26 19:56:22.271814+09:00

时间的类型

形式 实例
字符串形式 ‘2021/11/26’,‘16:34:20’
timestamp时间戳 在计算机中,时间实际上是用数字表示的。我们把1970年1月1日 00:00:00 UTC+00:00时区的时刻称为epoch time,记为0(1970年以前的时间timestamp为负数),当前时间就是相对于epoch time的秒数,称为timestamp。你可以认为:timestamp = 0 = 1970-1-1 00:00:00 UTC+0:00,对应的北京时间是:timestamp = 0 = 1970-1-1 08:00:00 UTC+8:00
本地时间 本地时间是指当前操作系统设定的时区。例如北京时区是东8区,则本地时间:2015-04-19 12:20:00,实际上就是UTC+8:00时区的时间:2015-04-19 12:20:00 UTC+8:00,而此刻的格林威治标准时间与北京时间差了8小时,也就是UTC+0:00时区的时间应该是:2015-04-19 04:20:00 UTC+0:00
utc时间 具有时区信息,同一时间点不同的时区,时间点不同,通过在时间后面加 UTC+来表示,UTC时间指UTC+0:00时区的时间
datetime datetime表示的时间需要时区信息才能确定一个特定的时间,否则只能视为本地时间。如果要存储datetime,最佳方法是将其转换为timestamp再存储,因为timestamp的值与时区完全无关.

时间类型的转化

  • str与datetime
    • 字符串形式转化为datetime datetime.datetime.strptime('2015-6-1 18:19:59', '%Y-%m-%d %H:%M:%S')
      • 只有datetime对象有该方法
      • 注意转换后的datetime是没有时区信息的。
    • datetime对象转化为字符串 datetime.datetime().strftime('%a, %b %d %H:%M')
      • date对象和time对象也有该方法

      • 如果你想将时间对象转化为字符串对象的话,可以用到__format__(…)方法以指定格式进行时间输出:

          >>> a = datetime.time(12,20,59,899)
          >>> a.__format__('%H:%M:%S')
          '12:20:59'
        
  • 转换格式
符号 说明
%y 两位数的年份表示(00-99)
%Y 四位数的年份表示(000-9999)
%m 月份(01-12)
%d 月内中的一天(0-31)
%H 24小时制小时数(0-23)
%I 12小时制小时数(01-12)
%M 分钟数(00=59)
%S 秒(00-59)
%a 本地简化星期名称
%A 本地完整星期名称
%b 本地简化的月份名称
%B 本地完整的月份名称
%c 本地相应的日期表示和时间表示
%j 年内的一天(001-366)
%p 本地A.M.或P.M.的等价符
%U 一年中的星期数(00-53)星期天为星期的开始
%w 星期(0-6),星期天为星期的开始
%W 一年中的星期数(00-53)星期一为星期的开始
%x 本地相应的日期表示
%X 本地相应的时间表示
%Z 当前时区的名称
%% %号本身
  • timestamp与datetime
    • datetime 转化为timestamp datetime.datetime.timestamp()
    • timestamp 转化为 datetime
      • 本地时间的datetime: datetime.datetime.fromtimestamp(t)
      • UTC时间的datetime: datetime.datetime.utcfromtimestamp(t)
  • 本地时间与utc时间
    • 本地时间转换为utc时间:一个datetime类型有一个时区属性tzinfo,但是默认为None,所以无法区分这个datetime到底是哪个时区,除非强行给datetime设置一个时区.需要自己创建时区对象,然后赋值给datetime对象

        from datetime import datetime, timedelta, timezone
        tz_utc_8 = timezone(timedelta(hours=8)) # 创建时区UTC+8:00
        now = datetime.now()
        now
        #datetime.datetime(2015, 5, 18, 17, 2, 10, 871012)
        dt = now.replace(tzinfo=tz_utc_8) # 强制设置为UTC+8:00
        dt
        #datetime.datetime(2015, 5, 18, 17, 2, 10, 871012, tzinfo=datetime.timezone(datetime.timedelta(0, 28800)))
        #如果系统时区恰好是UTC+8:00,那么上述代码就是正确的,否则,不能强制设置为UTC+8:00时区。
      
from datetime import datetime, timedelta, timezone
tz_utc_8 = timezone(timedelta(hours=10)) # 创建时区UTC+10:00
now = datetime.now()
##datetime.datetime(2015, 5, 18, 17, 2, 10, 871012)
dt = now.replace(tzinfo=tz_utc_8) # 强制设置为UTC+10:00
dt
##datetime.datetime(2015, 5, 18, 17, 2, 10, 871012, tzinfo=datetime.timezone(datetime.timedelta(0, 28800)))
##如果系统时区恰好是UTC+8:00,那么上述代码就是正确的,否则,不能强制设置为UTC+8:00时区。
datetime.datetime(2021, 11, 26, 18, 6, 6, 638669)

datetime.datetime(2021, 11, 26, 18, 6, 6, 638669, tzinfo=datetime.timezone(datetime.timedelta(seconds=36000)))

日期的比较

##加减
a=datetime.now()
b=datetime(2021,12,3,15,43,20)
a-b
##比较大小
a.__eq__(b)
a.__ne__(b)
a.__le__(b)
a.__lt__(b)
a.__ge__(b)
a.__gt__(b)
datetime.timedelta(days=-7, seconds=10923, microseconds=860522)

False

True

True

True

False

False

time

什么是时间元组?

很多Python函数用一个元组装起来的9组数字处理时间:

序号 字段
0 4位数年 2008
1 1 到 12
2 1到31
3 小时 0到23
4 分钟 0到59
5 0到61 (60或61 是闰秒)
6 一周的第几日 0到6 (0是周一)
7 一年的第几日 1到366 (儒略历)
8 夏令时 -1, 0, 1。-1是决定是否为夏令时的旗帜

上述也就是struct_time元组。这种结构具有如下属性:

序号 属性
0 tm_year 2008
1 tm_mon 1 到 12
2 tm_mday 1 到 31
3 tm_hour 0 到 23
4 tm_min 0 到 59
5 tm_sec 0 到 61 (60或61 是闰秒)
6 tm_wday 0到6 (0是周一)
7 tm_yday 1 到 366(儒略历)
8 tm_isdst -1, 0, 1。 -1是决定是否为夏令时的旗帜

时间元组与timestamp的转化

From To Use
seconds since the epoch struct_time in UTC time.gmtime()
seconds since the epoch struct_time in local time time.localtime()
struct_time in UTC seconds since the epoch calendar.timegm()
struct_time in local time seconds since the epoch time.mktime()
方法 解释
time.localtime([secs]) 将一个时间戳转换为当前时区的struct_time。secs参数未提供,则以当前时间为准。
time.gmtime([secs]) 和localtime()方法类似,gmtime()方法是将一个时间戳转换为UTC时区(0时区)的struct_time。
time.time() 返回当前时间的时间戳。
time.mktime(t) 将一个本地时间的struct_time转化为时间戳。
time.sleep(secs) 线程推迟指定的时间运行。单位为秒。
time.clock() 这个需要注意,在不同的系统上含义不同。在UNIX系统上,它返回的是“进程时间”,它是用秒表示的浮点数(时间戳)。而在WINDOWS中,第一次调用,返回的是进程运行的实际时间。而第二次之后的调用是自第一次调用以后到现在的运行时间。(实际上是以WIN32上QueryPerformanceCounter()为基础,它比毫秒表示更为精确)
time.asctime([t]) 把一个表示时间的元组或者struct_time表示为这种形式:‘Sun Jun 20 23:21:05 1993’。如果没有参数,将会将time.localtime()作为参数传入。
time.ctime([secs]) 把一个时间戳(按秒计算的浮点数)转化为time.asctime()的形式。如果参数未给或者为None的时候,将会默认time.time()为参数。它的作用相当于time.asctime(time.localtime(secs))。
time.strftime(format[, t]) 把一个代表时间的元组或者struct_time(如由time.localtime()和time.gmtime()返回)转化为格式化的时间字符串。如果t未指定,将传入time.localtime()。如果元组中任何一个元素越界,ValueError的错误将会被抛出。
time.strptime(string[, format]) 把一个格式化时间字符串转化为struct_time。实际上它和strftime()是逆操作。当使用strptime()函数时,只有当在这年中的周数和天数被确定的时候%U和%W才会被计算。
两个重要属性
time.timezone time.timezone是当地时区(未启动夏令时)距离格林威治的偏移秒数(>0,美洲<=0大部分欧洲,亚洲,非洲)。
time.tzname time.tzname包含一对根据情况的不同而不同的字符串,分别是带夏令时的本地时区名称,和不带的。

image.png

import time

calendar

日历(Calendar)模块

此模块的函数都是日历相关的,例如打印某月的字符月历。

星期一是默认的每周第一天,星期天是默认的最后一天。更改设置需调用calendar.setfirstweekday()函数。模块包含了以下内置函数:

序号 函数及描述
calendar.calendar(year,w=2,l=1,c=6) 返回一个多行字符串格式的year年年历,3个月一行,间隔距离为c。 每日宽度间隔为w字符。每行长度为21* W+18+2* C。l是每星期行数。
calendar.firstweekday( ) 返回当前每周起始日期的设置。默认情况下,首次载入 calendar 模块时返回 0,即星期一。
calendar.isleap(year) 是闰年返回 True,否则为 False。
calendar.leapdays(y1,y2) 返回在Y1,Y2两年之间的闰年总数。
calendar.month(year,month,w=2,l=1) 返回一个多行字符串格式的year年month月日历,两行标题,一周一行。每日宽度间隔为w字符。每行的长度为7* w+6。l是每星期的行数。
calendar.monthcalendar(year,month) 返回一个整数的单层嵌套列表。每个子列表装载代表一个星期的整数。Year年month月外的日期都设为0;范围内的日子都由该月第几日表示,从1开始。
calendar.monthrange(year,month) 返回两个整数。第一个是该月的星期几的日期码,第二个是该月的日期码。日从0(星期一)到6(星期日);月从1到12。
calendar.prcal(year,w=2,l=1,c=6) 相当于 print calendar.calendar(year,w=2,l=1,c=6)。
calendar.prmonth(year,month,w=2,l=1) 相当于 print calendar.month(year,month,w=2,l=1) 。
calendar.setfirstweekday(weekday) 设置每周的起始日期码。0(星期一)到6(星期日)。
calendar.timegm(tupletime)和time.gmtime相反 接受一个时间元组形式,返回该时刻的时间戳(1970纪元后经过的浮点秒数)。
calendar.weekday(year,month,day) 返回给定日期的日期码。0(星期一)到6(星期日)。月份为 1(一月) 到 12(12月)。
import calendar
print(calendar.calendar(2021))
                                  2021

      January                   February                   March
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
             1  2  3       1  2  3  4  5  6  7       1  2  3  4  5  6  7
 4  5  6  7  8  9 10       8  9 10 11 12 13 14       8  9 10 11 12 13 14
11 12 13 14 15 16 17      15 16 17 18 19 20 21      15 16 17 18 19 20 21
18 19 20 21 22 23 24      22 23 24 25 26 27 28      22 23 24 25 26 27 28
25 26 27 28 29 30 31                                29 30 31

       April                      May                       June
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
          1  2  3  4                      1  2          1  2  3  4  5  6
 5  6  7  8  9 10 11       3  4  5  6  7  8  9       7  8  9 10 11 12 13
12 13 14 15 16 17 18      10 11 12 13 14 15 16      14 15 16 17 18 19 20
19 20 21 22 23 24 25      17 18 19 20 21 22 23      21 22 23 24 25 26 27
26 27 28 29 30            24 25 26 27 28 29 30      28 29 30
                          31

        July                     August                  September
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
          1  2  3  4                         1             1  2  3  4  5
 5  6  7  8  9 10 11       2  3  4  5  6  7  8       6  7  8  9 10 11 12
12 13 14 15 16 17 18       9 10 11 12 13 14 15      13 14 15 16 17 18 19
19 20 21 22 23 24 25      16 17 18 19 20 21 22      20 21 22 23 24 25 26
26 27 28 29 30 31         23 24 25 26 27 28 29      27 28 29 30
                          30 31

      October                   November                  December
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
             1  2  3       1  2  3  4  5  6  7             1  2  3  4  5
 4  5  6  7  8  9 10       8  9 10 11 12 13 14       6  7  8  9 10 11 12
11 12 13 14 15 16 17      15 16 17 18 19 20 21      13 14 15 16 17 18 19
18 19 20 21 22 23 24      22 23 24 25 26 27 28      20 21 22 23 24 25 26
25 26 27 28 29 30 31      29 30                     27 28 29 30 31

数据压缩

以下模块直接支持通用的数据打包和压缩格式:zlib,gzip,bz2,zipfile,以及 tarfile。

性能度量 timeit

有些用户对了解解决同一问题的不同方法之间的性能差异很感兴趣。Python 提供了一个度量工具,为这些问题提供了直接答案。

例如,使用元组封装和拆封来交换元素看起来要比使用传统的方法要诱人的多,timeit 证明了现代的方法更快一些。

>>> import timeit
>>> timeit.timeit('"-".join(str(n) for n in range(100))', number=10000)
>>> timeit.timeit('"-".join([str(n) for n in range(100)])', number=10000)
>>> timeit.timeit('"-".join(map(str, range(100)))', number=10000)
0.574813199986238

0.5708962000207976

0.3446741999941878
##timeit.timeit('')
timeit.repeat('"-".join(str(n) for n in range(100))',repeat=5,number=10000)#
[0.647509300004458,
 0.6230467000277713,
 0.569728300004499,
 0.5259624000173062,
 0.7396067999943625]

测试模块

开发高质量软件的方法之一是为每一个函数开发测试代码,并且在开发过程中经常进行测试

doctest

doctest模块提供了一个工具,扫描模块并根据程序中内嵌的文档字符串执行测试。

测试构造如同简单的将它的输出结果剪切并粘贴到文档字符串中。

通过用户提供的例子,它强化了文档,允许 doctest 模块确认代码的结果是否与文档一致:

unittest

unittest模块不像 doctest模块那么容易使用,不过它可以在一个独立的文件里提供一个更全面的测试集:

decimal

用于精确控制运算精度和有效位数和四舍五入操作的10进制运算

logging

提供了灵活的记录事件,错误,警告和调试信息等日志信息的功能

参考

上一页
下一页