ÔÚWindowsÏÂʹÓÃPython±à³Ì
Ò»¡¢Ê¹ÓÃPythonÐèÒªÖªµÀµÄ
ÔÚ Windows ÉÏ£¬°²×° Python ÓÐÁ½ÖÖÑ¡Ôñ¡£
1¡¢ActiveState ÖÆ×÷µÄ ActivePython ÊÇרÃÅÕë¶Ô Windows µÄ Python Ì×¼þ£¬Ëü°üº¬ÁËÒ»¸öÍêÕûµÄ Python ·¢²¼¡¢Ò»¸öÊÊÓÃÓÚPython ±à³ÌµÄ IDE ÒÔ¼°Ò»Ð© PythonµÄ Windows À©Õ¹£¬ÌṩÁËÈ«²¿µÄ·ÃÎÊ Windows APIs µÄ·þÎñ£¬ÒÔ¼° Windows×¢²á±íµÄ×¢²áÐÅÏ¢¡£ËäÈ» ActivePython ²»ÊÇ¿ªÔ´Èí¼þ£¬µ«Ëü¿ÉÒÔ×ÔÓÉÏÂÔØ¡£ActivePython ÊÇÎÒѧϰPython ʱʹÓùýµÄ IDE¡£³ý·ÇÓбðµÄÔÒò£¬ÎÒ½¨ÒéÄúʹÓÃËü¡£¿ÉÄܵÄÒ»¸öÔÒòÊÇ£ºActiveState ͨ³£ÒªÔÚÐ嵀 Python °æ±¾·¢²¼¼¸¸öÔÂÒÔºó²Å¸üÐÂËüµÄ°²×°³ÌÐò¡£Èç¹ûÄú¾ÍÐèÒª Python µÄ×îа汾£¬²¢ÇÒ ActivePython ÈÔÈ»ÂäºóÓÚ×îа汾µÄ»°£¬ÄúÓ¦¸ÃÖ±½ÓÌøµ½ÔÚ Windows ÉÏ°²×° Python µÄµÚ¶þÖÖÑ¡Ïî¡£
2¡¢µÚ¶þÖÖÑ¡ÔñÊÇʹÓÃÓÉ Python ·¢²¼µÄ “¹Ù·½” Python °²×°³ÌÐò¡£ËýÊÇ¿É×ÔÓÉÏÂÔصĿªÔ´Èí¼þ£¬²¢ÇÒÄú×ÜÊÇ¿ÉÒÔ»ñµÃµ±Ç° Python µÄ×îа汾¡£
¶þ¡¢°²×° ActivePython
ÔÚWindows°²×°ActivePythonµÄ·½·¨ÈçÏ£º
1¡¢´Ó http://www.activestate.com/Products/ActivePython/ ÏÂÔØ ActivePython ¡£ÎÒµÄÏÂÔصØַΪ£ºhttp://downloads.activestate.com/ActivePython/releases/2.6.4.10/ActivePython-2.6.4.10-win32-x86.msi
2¡¢Èç¹ûÄúÕýÔÚʹÓà Windows 95¡¢Windows 98 »ò Windows ME£¬»¹ÐèÒªÔÚ°²×° ActivePython ֮ǰÏÂÔز¢°²×°Windows Installer 2.0 (http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe) ¡£
3¡¢Ë«»÷°²×°³ÌÐò ActivePython-2.6.4.10-win32-x86.msi¡£
4¡¢ °´ÕÕ°²×°³ÌÐòµÄÌáʾÐÅÏ¢Ò»²½²½µØÖ´ÐС£
5¡¢Èç¹û´ÅÅ̿ռ䲻×㣬Äú¿ÉÒÔÖ´Ðж¨ÖÆ°²×°£¬²»Ñ¡Îĵµ£¬µ«ÊDZ¾È˲»½¨ÒéÄúÕâÑù×ö£¬³ý·ÇÄúʵÔÚÊǼ·²»³ö14M¿Õ¼äÀ´¡£
6.¡¢ÔÚ°²×°ÍêºóÖ®ºó£¬¹Ø±Õ°²×°³ÌÐò£¬´ò¿ª ¿ªÊ¼->³ÌÐò->ActiveState->ActivePython 2.2->PythonWin IDE¡£Äú½«¿´µ½ÌáʾÐÅÏ¢¡£
Èý¡¢°²×°À´ ×Ô Python.org (http: //www.p ython.org/) µÄ Python
1¡¢´Ó http://www.python.org/ftp/python/ Ñ¡Ôñ×îÐ嵀 Python Windows °²×°³ÌÐò£¬ÏÂÔØ .exe °²×°Îļþ¡£ÏÂÔصØַΪ£ºhttp://www.python.org/ftp/python/3.1/python-3.1.msi
2¡¢Ë«»÷°²×°³ÌÐòpython-3.1.msi¡£ÎļþÃûÒÀÀµÓÚÄúËùÏÂÔØµÄ Python °²×°³ÌÐòÎļþ¡£
3¡¢°´ÕÕ°²×°³ÌÐòµÄÌáʾÐÅÏ¢Ò»²½²½µØÖ´ÐС£
4¡¢Èç¹û´ÅÅ̿ռ䲻×㣬¿ÉÒÔÈ¡Ïû HTMLHelp Îļþ¡¢ÊµÓýű
Ïà¹ØÎĵµ£º
PythonÖÐRangeºÍXRangeµÄÇø±ð(Difference between Range and XRange in Python)
×î½ü»úÆ÷³öÁ˵ãÎÊÌ⣬ËùÒÔһֱûÓÐдеĶ«Î÷³öÀ´¡£Ö®Ç°ÔÚ¶ÁPythonµÄ´úÂëµÄʱºò£¬·¢¾õºÃ¶àÈËϲ»¶ÓÃXRange£¬¶ø²»ÊÇRange£¬ÎÒÒ²Ö»ÊǼǵÃѧϰµÄʱºò¿ªÊ¼Ñ§µ½µÄÊÇRange£¬ºóÃæÓÖ¿´µ½ÓиöXRange£¬µ±Ê±Ò²Ã»ÓÐÉ£¬ÎªÊ²Ã´PythonÀïÃæÒªÓÐÁ½¸öͬÑùµÄ¹¦ ......
PLYÄ£¿é ÊÇLex/YACCPython µÄʵÏÖ£¬¿ÉÒÔÓÃÀ´ÊµÏÖ´Ê·¨·ÖÎö/Óï·¨·ÖÎö£¬µ«ÈçºÎÓ㬻¹Ã»Ñо¿£¬ÒÔºóÓÐʱ¼äÔÙÑо¿°É£»
Ö÷Ò³: http://www.dabeaz.com/ply/
pycparserÄ£¿é ÊÇʹÓÃPLYÄ£¿é·ÖÎöcÓïÑÔÓï·¨µÄÄ£¿é£¬Ã»Ê²Ã´Îĵµ£¬µ«Ä£¿é×Ô´øÁËÀý×ӺͲâÊÔÓÃÀý¡£
Ö÷Ò³: http://code.google.com/p/pycpa ......
×î½üÔÚ´ÓÍ·¿ªÊ¼Ñ§Ï°Python, Ï£ÍûÓÃblog˳±ã¼Ç¼ÏÂÀ´Ò»Ð©Ð¡µÄ¼¼ÇÉ¡£
½ñÌì¼Ç¼µÚÒ»¸ö£º variable _
ÔÚpythonµÄ½»»¥sessionÖУ¬Ò²¾ÍÊDz»´øÎļþÃûÖ±½ÓÊäÈë"Python”Ö®ºópythonËù´´½¨µÄsession£¬
±äÁ¿"_"»á±£´æÉÏÒ»´Î¼ÆËãµÄ½á¹û¡£ÀýÈ磺
Õâ¸ö±äÁ¿¶Ô¾³£°Ñpythonµ±¼ÆËãÆ÷ÓõÄͬѧ¿ÉÄÜÓÐÓá£
²Î¿¼£ºsys.displayhook( ......
×î½üʹÓÃpython¹ý³ÌÖУ¬python½çÃæµÄ±à³Ì¹¤¾ßGTK-Python£¬µ«ÊǽçÃæµÄÃÀ¹ÛÐÔ²»ÈçQt-CreatorÖеÄQt-Designer£¬ÎÞ·¨ÊµÏÖÉè¼ÆÊÇÊÓͼ»æÖÆ£¬ÓеãÈÃÈËʧÍû¡£
ÍøÉÏ·¢ÏÖÓÐÈ˽éÉÜpython Eric IDE,±È½ÏºÃÆ棬°²×°ÉÏ¿´¿´°É£º
&nb ......
pythonÖеÄdatetime moduleÊÇרÃÅ´¦Àíʱ¼äÏà¹ØÄÚÈݵÄÄ£¿é,¹¦ÄܺÜÇ¿´ó,µ«ÊÇ·´¶øÏԵñȽϸ´ÔÓ¡£
һϴúÂëÊÇÓÃÀ´Çó´ÓmysqlÖÐÈ¡µ½µÄtimestampºÍµ±Ç°Ê±¼ä±È½Ï£¬Çóʱ¼ä²îµÄ·½·¨
import datetime
lasttime=a.get_last_timestamp(sid=40)[-1]["last_time"] #È¡µ½timestamp
delta = datetime.datetime.now()-lasttime # ......