python性能增强工具shedskin 0.3版发布
http://code.google.com/p/shedskin/ Shed Skin 0.3 - support for 3 new standard library modules (now about 20 in total): - itertools (jeremie roquet) - heapq (jeremie roquet) - csv (converted using shedskin) - 4 new example programs (now 44 in total!): - maximum weighted matching algorithm (joris van rantwijk) - kanoodle: knuth's dancing links (david austin) - bidirectional dijkstra algorithm (from networkx, uses heapq) - barnes-hut force calculation - improved type inference (scalability, bugfixes, major cleanup) - support for 'map', 'filter', 'reduce' and 'next' - support for 'with' statement (jeremie roquet) - support for 'key' argument of 'sorted' (and 'list.sort') - reorganized codebase, distutils setup.py (thomas spura) - optimized list indexing (joris van rantwijk) - optimized addition of 1-length lists and strings - improved forward referencing of variables/functions - avoid GCC warnings after 'shedskin -e' - support for passing keyword arguments to extension modules - optimized list slicing - ignore blocks surrounded by #{ and #} (mike schrick) - add --makefile option (mike schrick) - several cleanups, removing about 100 lines again - large amount of bugfixes
相关文档:
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 al ......
threading — Higher-level threading interface
This module constructs higher-level threading interfaces on top of the lower level _thread module. See also the queue module.
The dummy_threading module is provided for situations where threading cannot be used because _thread is missing.
......
multiprocessing — Process-based “threading” interface
Introduction
multiprocessing is a package that supports spawning processes using an API similar to the threading module. The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Glo ......
这是一个简单的表达式计算器, 不太懂用Tkinter写GUI, 参考了别人的代码
from __future__ import division
from Tkinter import Tk, Entry, Button, Label, mainloop
from tkFont import Font
def get_value ():
v = ''
try:
v = eval(text.get()) #use eval to calculate the vlaue of the text
except:
pa ......
writeblog.csdn.net writeblog.csdn.net/PostEdit.aspx
这个程序很早以前就写过了,而且是参考的别人的写,具体谁的发在哪里我都忘记了。这里就算是半原创了,如有侵权请及时通知改正。
因为从今天1月1号开始,Google上订阅的天气预报服务已经取消了,估计是Google被施加压力了。反正是收不到天气预报了。正好重拾以前 ......