Python IDE and GUI Framework for Windows
Pythonwin - Python IDE and GUI Framework for Windows.
Copyright 1994-2006 Mark Hammond
Python is Copyright (c) 2000-2008 ActiveState Software Inc.
Copyright (c) 2001-2008 Python Software Foundation.
All Rights Reserved.
Copyright (c) 2000 BeOpen.com.
All Rights Reserved.
Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.
Scintilla is Copyright 1998-2004 Neil Hodgson (http://www.scintilla.org)
This program uses IDLE extensions by Guido van Rossum, Tim Peters and others.
Thanks to the following people for making significant contributions: Sam Rushing, Curt Hagenlocher, Dave Brennan, Roger Burnham, Gordon McMillan, Neil Hodgson, Laramie Leavitt. (let me know if I have forgotten you!)
http://starship.python.net/crew/mhammond/win32
相关文档:
Python中可以使用装饰器对函数进行装饰(或说包装),利用这个特性,可以很方便、简洁地解决一些问题,比如获得函数执行时间的问题。
首先,我们定义一个函数,如下:
def exeTime(func):
def newFunc(*args, **args2):
t0 = time.time()
print "@%s, {%s} start" % (time.strftime("%X", time.local ......
Python中的异常
当你的程序中出现某些异常的状况的时候,异常就发生了。
一.处理异常
我们可以使用try..except语句来处理异常。我们把通常的语句放在try-块中,而把我们的错误处理语句放在except-块中。
例如:
#!/usr/bin/python
# Filename: try_except.py
import sys
try:
s = raw_input('E ......
1.list(数组)
x代表数组中的元素,i代表位置
a) append(x) 把元素x添加到数组的尾部
b) insert(i,x) 把元素x 插入到位置i
c) remove(x) 删除第一个元素x
d) pop(i) 删除第i个元素,并返回这个元素。若调用pop()则删除最后一个元素
e) index(x) 返回数组中第一个值为x的位置。如果没有匹配的元素会抛出一个错误
f ......