摘要: import pickleclass Bird(object): fly = True legs = 2 def __init__(self) : print("初始化") def callback(self,call): call(); def getfunction(self): #闭包 def ret(): print('callback running') return ret; summer = Bird()#序列化picklestring = pickle.dumps(summer);print(picklestring)summer.callb 阅读全文
posted @ 2013-02-28 17:31 洪 阅读(153) 评论(0) 推荐(0)
摘要: # coding: UTF-8import os,sys,codecsfrom stat import *root = 'D:/hjhtemp/cdt8' #pathsearch = 'buildConsoleLines' #keywordsearch_file_type = '.java' #file typedef worktree(top,callback): for f in os.listdir(top): pathname = os.path.join(top,f) mode = os.stat(pathname)[ST_MODE] 阅读全文
posted @ 2013-02-28 10:07 洪 阅读(335) 评论(0) 推荐(0)