http://code.google.com/p/shedskin/Shed Skin 0.3 - support for 3 new standard library modules (now about 20 in total):- itertools (jeremie roquet)- heapq (jeremie roquet)- csv (converted using shedskin)- 4 new example programs (now 44 in total!):-
1, 異常文法try: <statement>except <name1>: <statement> # if name1 is raisedexcept <name2>: <statement> # if name2 is raisedexcept (name3, name4): <statement> # if name3 or name4 raisedexcept:
httplib注意事項 1.使用httplib進行post請求時遇到錯誤:Exception happened during processing of request from ('192.168.8.23', 58164)Traceback (most recent call last): File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock self.process_request(
在zope執行個體所採用的python的路徑中,找到site-packages目錄,在此目錄中建立一個sitecustomize.py檔案,設定相應的許可權。檔案的內容如下:import syssys.setdefaultencoding("utf-8") 重啟zope執行個體,這樣將解決很多unicodedecodeerror錯誤。=========================================#for python2.7 on
1 callable內建函數判斷一個名字是否為一個可調用函數>>> import math>>> x = 1>>> y = math.sqrt>>> callable(x)False>>> callable(y)True2 記錄函數(文檔字串)>>> def square(x): 'calculates the square of number x' return x * x&
瞭解Gearman,請訪問gearman官網:http://gearman.org/index.php?id=getting_startedGearman for Python API Doc: http://pythonhosted.org/gearman/++++++++++++++++++++++++++++++++++++++++++++安裝Gearman:++++++++++++++++++++++++++++++++++++++++++++ 基礎依賴庫:yum install