http://blog.csdn.net/jj_liuxin/archive/2008/12/21/3574638.aspx閑來無事,隨便看看Python 3.0的文檔,發現了一個很pythonic的模組:聲音播放 for windows;湊個流行語叫做“很傻很天真”,不過挺好使得。1>winsound.Beep2>winsound.PlaySound()每一個都有不同的用法,一個一個來看吧。1>winsound.Beep(frequency, duration)
下載:http://www.dcc.fc.up.pt/~jpp/code/python-glpk/安裝:http://en.wikibooks.org/wiki/GLPK/Python Google: python GLPK http://spokutta.wordpress.com/the-gnu-linear-programming-kit-glpk/ There are several interfaces for Python:Python: python-glpk (see
Python 2.3.4 (#1, Feb 2 2005, 11:44:13) [GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> user=raw_input("please input:") please input:wei
又是下網頁資料,之前用Python寫過一個,下載的是國家統計局網站上的資訊,地址為:http://blog.csdn.net/liminlu0314/article/details/7300240。 這次依舊是,不過下載的是Australian Bureau of Statistics的資料,都是xls的表格,網址為:http://www.abs.gov.au。網頁開啟左邊有棵樹目錄,裡面記錄的澳大利亞的行政區名,然後後面有個get data
看了一下午的《Python簡明教程》,順手寫了個N皇后的程式玩玩兒。程式只用到了基本的功能。貼在這裡記錄一下。 def isOK(row,col): '''Is it possible that a queen is put at (row,col)?''' for i in range(1,row): if col==queen[i-1] or col-queen[i-1]==row-i or col-queen[i-1]==i-row: ret
just for funserver = wsgiserver.CherryPyWSGIServer(('0.0.0.0',8000),app)server.start()是程式入口,其中app是你的應用程式def app(environ,start_response): out = 'tmp/'+str(uuid.uuid1())+'.zip' status = '200 OK' filename = 'test.zip' response_header =