PROGRAM_MAX_LENGTH = 60*60*3 #3 hours
skiptimes = 0
TOTALTIMES = 0
def xxx():
print TOTALTIMES #fine consider it as constant
#TOTALTIMES += 1 #NOT OK
global TOTALTIMES
TOTALTIMES += 1 #OK
print 到控制台重定向的一个错误
http://apoo.bokee.com/7028948.html