12 2013 档案
摘要:直接:for i in range(1,n+1): print(i) if xls.getCell(i,1,1)=='id': res=[] xls.xlBook.Worksheets(i).Name=xls.xlBook.Worksheets(i).Name.capitalize()才能成功更改每个工作表的名字.这样就不行:for i in range(1,n+1): print(i) if xls.getCell(i,1,1)=='id': res=[] t=xls.xlBook.Worksheets(i).N...
阅读全文
摘要:def f(x): print 'original' if x > 0: return f(x-1) return 0g = fdef f(x): print 'new' return xprint g(5)结果是:originalnew4证明了:1.when g(5) runs, origninal `f`is called,not new `f`.2.as 5>0,'return f(x-1)'is executed3.new`f`is called when `f(x-1)` runs. so the result is 4.
阅读全文
摘要:今天统计了下某个时刻各进程的内存和CPU使用概况.结果发现,Chrome消耗量真是不一般的大.比Windows主进程都还猛!另外发现百度安全卫士占用CPU也比较猛.powershell下输入:ps | Out-File C:\Users\Nan\Desktop\test.txt然后分析输出数据即可.If you typeget-help get-process -full You will get an explanation of these terms. Here it is:The default display of a process is a table that include.
阅读全文
摘要:Fn + p = pauseFn + b = break
阅读全文
摘要:1)运行regedit进入注册表。2)依次打开:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer3)右侧框图,把"link"值改为"00 00 00 00"即可
阅读全文
摘要:真是十分神奇..import win32com.clientimport times = win32com.client.Dispatch("SAPI.SpVoice")s.Speak('哈哈,真有趣,能说中文,还能说English,要不要试试那个什么用一百种语言说我爱你...')我瞬间有种不怕Python做不到就怕自己想不到的感觉.
阅读全文
摘要:(?aiLmsux)(One or more letters from the set 'a', 'i', 'L', 'm', 's', 'u', 'x'.) The group matches the empty string; the letters set the corresponding flags: re.A (ASCII-only matching), re.I (ignore case), re.L (locale dependent), re.M (multi-li
阅读全文