pyinstaller ---- executable maker for python, Python 程序包装成可执行文件

Max Recursion Exceeded

  • 设置最大循环数
1
2
3
4
5
6
import sys
sys.setrecursionlimit(100000)

from PyInstaller.utils.hooks import collect_data_files, collect_submodules

block_cipher = None

收集动态导入模块 hidden modules

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
hiddenimports = collect_submodules('pkg_resources._vendor') + ['pkg_resources.py2_warn']

a = Analysis(['socketapi.py'],
         pathex=['d:\\Documents\\HSC_Chemistry\\python_side\\test_resconstruct'],
         binaries=[],
         datas=[('databases', 'databases')],
         hiddenimports=hiddenimports,   # **** ...... set hidden import s here
         hookspath=[],
         runtime_hooks=[],
         excludes=[],
         win_no_prefer_redirects=False,
         win_private_assemblies=False,
         cipher=block_cipher,
         noarchive=False)

aiohttp ---- Async IO Web Framework

Client

ClientSession

response

  • resp.status
一次性读取内容
  • resp.text()

    • 文本 str 类型
    • resp.text(encoding='gbk')
  • resp.read()

    • bytes 类型
  • resp.json()

    • 提取 json
流模式读取 Streaming Response Content
  • resp.content.read(10)

request

  • session.get
  • session.put
关键字参数 arguments
params
json
  • session.post(url, json={'test': 'value'})

socket ---- python socket library

英语名词

wordsexplain
backlog积压的待办工作
imperative必要的, 不可避免的
it's imperative to do sth.
switchboard配电盘
switchboard operator总机,接线员(电话接线员)
overhead经常性的
insideout心中有数(我自己认为的解释)
your app should be almost insideout.
multiplex多路的,多工的
simplex单一的,单工的