自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (5)
  • 收藏
  • 关注

翻译 asyncio 系列六、asyncio的网络原语

官网连接:https://docs.python.org/zh-cn/3.7/library/asyncio-stream.html流是用于处理网络连接的高级 async/await-ready 原语。流允许发送和接收数据,而不需要使用回调或低级协议和传输。下面官网例子,是一个使用 asyncio streams 编写的 TCP echo 客户端示例:import asyncio...

2019-05-24 22:42:05 1768

翻译 asyncio 系列五、asyncio的事件循环

官网连接:https://docs.python.org/zh-cn/3.7/library/asyncio-eventloop.html#asyncio.loop.run_in_executor事件循环是每个 asyncio 应用的核心。 事件循环会运行异步任务和回调,执行网络 IO 操作,以及运行子进程。里面封装的方法用于上层函数调用。本节所针对的主要是低层级代码、库和框架的编写者,...

2019-05-24 22:29:23 7738 1

翻译 python 协程库 asyncio 翻译列表

asyncio 模块官网连接:https://docs.python.org/zh-cn/3.7/library/asyncio.html同步原语参考链接:https://mozillazg.com/2017/08/python-asyncio-note-synchronization-primitives.html异步参考:http://python.jobbole.com/88291/...

2019-05-24 16:29:19 1152

翻译 asyncio 系列五、同步原语—Synchronization Primitives

官网连接:https://docs.python.org/zh-cn/3.7/library/asyncio-sync.html将 Synchronization Primitives 暂且翻译为同步原语,设计目的是为了和线程模块相似。一、Lockclassasyncio.Lock(*,loop=None)为了实现任务之间的互斥,不是线程安全的。用于保证独自使用资源。...

2019-05-24 16:12:55 2361

翻译 asyncio 系列四、期程 — asyncio.Future

asyncio的期程官网链接:https://docs.python.org/zh-cn/3/library/asyncio-future.html#asyncio.Future其实期程指的是,classasyncio.Future返回的实例,官网翻译为期程。一、期程函数asyncio.isfuture(obj)如果obj为下面任意对象,返回Tru...

2019-05-24 16:09:03 2554 1

翻译 asyncio 系列四、asyncio 的异常

异常官网连接:https://docs.python.org/zh-cn/3.7/library/asyncio-exceptions.htmlexceptionasyncio.TimeoutError该操作已超过规定的截止日期。重要:这个异常与内置TimeoutError异常不同。exceptionasyncio.CancelledError该操...

2019-05-24 15:58:02 9160 2

翻译 asyncio 系列三、asyncio 队列

asyncio 队列classasyncio.Queue(maxsize=0,*,loop=None)先进,先出(FIFO)队列如果maxsize小于等于零,则队列尺寸是无限的。如果是大于0的整数,则当队列达到maxsize时,awaitput()将阻塞至某个元素被get()取出。不像标准库中的并发型queue,队列的尺寸一直是已知的,可以通过调用...

2019-05-24 15:54:16 3686

翻译 asyncio 系列二、asyncio 子进程

asyncio的子进程官网连接:https://docs.python.org/zh-cn/3.7/library/asyncio-subprocess.html官网例子:import asyncioasync def run(cmd): proc = await asyncio.create_subprocess_shell( cmd, ...

2019-05-24 15:49:34 4749

翻译 asyncio 系列一、asyncio 的协程与任务

asyncio 的协程与任务官网:https://docs.python.org/zh-cn/3/library/asyncio-task.html#scheduling-from-other-threads一、协程用async定义的函数,可以叫协程函数、异步函数,本文统一叫协程函数。调用协程函数返回的对象叫协程对象。关键字 await 调用协程函数,也可以叫等待、等待调用,这...

2019-05-24 15:46:41 7918

原创 记一次安装python3.7.3

1、默认python3、ipython3、pip的路径 name@host:~$ which python /usr/bin/python name@host:~$ which python3 /usr/bin/python3 name@host:~$ which pip /usr/local/bin/pip name@host:~$ wh...

2019-05-20 15:59:47 4427 3

原创 concurrent.futures调研

concurrent.futures调研参考链接:官网:https://docs.python.org/3.7/library/concurrent.futures.htmlhttps://learnku.com/docs/pymotw/concurrentfutures-manage-pools-of-concurrent-tasks/3424#48d590https://www...

2019-05-20 12:14:12 1045

转载 python获取函数名类名

参考链接:1.在类内部获取类名和方法名代码:import sysclass testsqawd(object): def hello(self): print('the name of method is ## {}##'.format(sys._getframe().f_code.co_name)) print('the name of...

2019-05-18 19:09:21 12844

原创 Python type hints 调研

Python type hints 调研参考链接:官网https://docs.python.org/3/library/typing.htmlhttps://ocavue.com/python_typing.htmlhttps://blog.csdn.net/chuchus/article/details/77891128https://www.cnblogs.com/er...

2019-05-06 16:09:35 1175

Python 运算符是Python运算符列表

Python 运算符 是 Python所有的运算符 及其 优先级的表

2018-08-08

acer aspire 4560G 说明书

QG_ACER_1.0_CHS_AS4750G.pdf 是 acer aspire 4560G 宏碁笔记本电脑的说明书

2018-08-08

webbuilder 用网页编辑数据库的中数据

webbuilder Windows 系统中一款用网页编辑数据库的中数据的软件,支持多种数据库

2018-08-08

解析几何中二元多次函数 在 直角坐标中 的图像

此软件 多态生成 二元多次函数 在 直角坐标中 的函数图像

2018-08-08

自动投屏软件 window

window 自动投屏软件,可以把电脑删的东西投屏到电脑连接的无线网上的显示器上

2018-08-08

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除