易截截图软件、单文件、免安装、纯绿色、仅160KB

[Python module] select

16.1. select — Waiting for I/O completion¶
This module provides access to the select and poll functions available in most operating systems, epoll available on Linux 2.5+ and kqueue available on most BSD. Note that on Windows, it only works for sockets; on other operating systems, it also works for other file types (in particular, on Unix, it works on pipes). It cannot be used on regular files to determine whether a file has grown since it was last read.
The module defines the following:
这个模块提供大多数操作系统的select和poll功能。 epoll在Linux2.5+可用,kqueue则用于BSD。在winodws系统上,它仅用于socket,在其他系统下,它也可以用于其他类型(特别在 Unix 下,它还可以用于 管道)。它不能用来确定自从上次读取以后是否普通文件有所增长。
exception select. error ¶ The exception raised when an error occurs. The accompanying value is a pair containing the numeric error code from errno and the corresponding string, as would be printed by the C function perror .
在发生错误将引发异常。accompanying 值包含错误代码和错误描述文本,用于使用 C 程序 perror() 打印。
select. epoll ( [ sizehint=-1 ] ) ¶ (Only supported on Linux 2.5.44 and newer.) Returns an edge polling object, which can be used as Edge or Level Triggered interface for I/O events; see section Edge and Level Trigger Polling (epoll) Objects below for the methods supported by epolling objects.
仅仅在Linux2.5.44以上支持。
select. poll ( ) ¶ (Not supported by all operating systems.) Returns a polling object, which supports registering and unregistering file descriptors, and then polling them for I/O events; see section Polling Objects below for the methods supported by polling objects.
所有系统不支持。
select. kqueue ( ) ¶ (Only supported on BSD.) Returns a kernel queue object object; see section Kqueue Objects below for the methods supported by kqueue objects.
仅仅支持BSD。
select. kevent ( ident , filter=KQ_FILTER_READ , flags=KQ_ADD , fflags=0 , data=0 , udata=0 ) ¶ (Only suppor


相关文档:

用 python 快速搭建网游服务器

赖勇浩(http://laiyonghao.com)
今天(2009年5月31日) OurPNP.org 搞了个聚会活动,弄了十几二十个人在广州海珠广场的堂会呆了五个小时,创下了我在 K 房呆的最长时间纪录。应他们的邀请,我做了个题为《用 python 快速搭建网游服务器》的小演讲,因为那边的电视竟然不能接电脑,所以讲的时候没有能够参照 PPT 来讲,观 ......

解压文件夹中的压缩文件 Python脚本

下载了很多压缩文件,就写了一个脚本
在Python中使用winrar命令,所以一般压缩文件都支持
有些压缩文件Python中还没有相应的库
你得先把winrar添加到path环境变量中
把代码保存为rar.py
在dos下使用,如:rar.py "D:\A B\C" mkdir
#rar.py
#decompress with winrar
#arguments :filename directory opt
# op ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号