锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品热久久无码av,久久美女人爽女人爽,精品久久久噜噜噜久久久http://m.shnenglu.com/tangxinfa/category/7571.html寮鍙戣呬箣鏃?/description>zh-cnSat, 18 Feb 2012 16:21:38 GMTSat, 18 Feb 2012 16:21:38 GMT60python tipshttp://m.shnenglu.com/tangxinfa/articles/python_tips.html鍞愭柊鍙?/dc:creator>鍞愭柊鍙?/author>Mon, 09 Jan 2012 10:20:00 GMThttp://m.shnenglu.com/tangxinfa/articles/python_tips.htmlhttp://m.shnenglu.com/tangxinfa/comments/163884.htmlhttp://m.shnenglu.com/tangxinfa/articles/python_tips.html#Feedback0http://m.shnenglu.com/tangxinfa/comments/commentRss/163884.htmlhttp://m.shnenglu.com/tangxinfa/services/trackbacks/163884.html聽聽聽 import struct
聽聽聽 import socket
聽聽聽 struct.unpack('!I', socket.inet_aton('192.168.102.0'))
聽聽聽 socket.inet_ntoa(struct.pack('!I', 3232261632))
錛掞紝榛樿鐗堟湰涓簆ython3鐨勭郴緇熶笂涓存椂鍒囨崲鍥瀙ython2
聽聽 ln -s /usr/bin/python2 ./python
聽聽 export PATH=$PWD:$PATH
聽聽 鎺ヤ笅鏉ユ墽琛岀殑python鑴氭湰灝嗘槸python2


]]>
MySQLdb utf-8 tipshttp://m.shnenglu.com/tangxinfa/articles/python_mysqldb_utf8_tips.html鍞愭柊鍙?/dc:creator>鍞愭柊鍙?/author>Thu, 28 Apr 2011 17:22:00 GMThttp://m.shnenglu.com/tangxinfa/articles/python_mysqldb_utf8_tips.htmlhttp://m.shnenglu.com/tangxinfa/comments/145269.htmlhttp://m.shnenglu.com/tangxinfa/articles/python_mysqldb_utf8_tips.html#Feedback0http://m.shnenglu.com/tangxinfa/comments/commentRss/145269.htmlhttp://m.shnenglu.com/tangxinfa/services/trackbacks/145269.html
  • 鍋氬ソ鍥涗歡浜嬶細
  • 錛戯紝python婧愪唬鐮佷繚瀛樹負utf-8
    錛掞紝鏁版嵁搴撳緩鎴恥tf-8
    錛擄紝mysql榪炴帴璁劇疆涓簎tf-8
    錛旓紝鏌ヨ緄愭灉涓殑鏂囨湰瀛楁鏄痷nicode鐨勶紝杞洖utf-8銆?br />
    • 鎬葷粨鎬х殑紺轟緥浠g爜錛?/li>
    聽1#!/usr/bin/env聽python
    聽2#-*-聽coding:聽utf-8聽-*-
    聽3
    聽4import聽MySQLdb
    聽5
    聽6if__name__=='__main__':
    聽7聽聽聽聽mysql聽=聽MySQLdb.connect(host='localhost',聽user='root',聽passwd='123456',聽charset='utf8')
    聽8聽聽聽聽cursor聽=聽mysql.cursor()
    聽9聽聽聽聽cursor.execute('SET聽NAMES聽UTF8')
    10聽聽聽聽sql聽='DROP聽DATABASE聽IF聽EXISTS聽mysqldb_utf8_test'
    11聽聽聽聽cursor.execute(sql)
    12聽聽聽聽sql聽='CREATE聽DATABASE聽mysqldb_utf8_test聽DEFAULT聽CHARACTER聽SET聽utf8聽COLLATE聽utf8_general_ci'
    13聽聽聽聽cursor.execute(sql)
    14聽聽聽聽mysql聽=聽MySQLdb.connect(host='localhost',聽user='root',聽passwd='123456',聽db='mysqldb_utf8_test',聽charset='utf8')
    15聽聽聽聽cursor聽=聽mysql.cursor()
    16聽聽聽聽cursor.execute('SET聽NAMES聽UTF8')
    17聽聽聽聽sql聽='CREATE聽TABLE聽utf8_table(key_field聽VARCHAR(32)聽NOT聽NULL,聽value_field聽VARCHAR(255)聽NOT聽NULL)'
    18聽聽聽聽cursor.execute(sql)
    19聽聽聽聽key聽='tangxinfa'
    20聽聽聽聽value聽='濂戒漢涓涓?/span>'
    21聽聽聽聽sql聽='INSERT聽INTO聽utf8_table聽VALUES("%s",聽"%s")'%(key,聽value)
    22聽聽聽聽cursor.execute(sql)聽聽聽聽聽聽 #娉ㄦ剰鏌愪簺鏃х増鏈殑mysql錛堝4.1.22浠ヤ笅錛夛紝mysql.character_set_name()鎬繪槸榪斿洖latin1錛屼細寮曡搗涔辯爜錛岄渶瑕佹敼涓?/span>cursor.execute('INSERT聽INTO聽utf8_table聽VALUES("%s",聽"%s")', (key,聽value))
    23聽聽聽聽sql聽='select聽*聽from聽utf8_table'
    24聽聽聽聽cursor.execute(sql)
    25聽聽聽聽for聽record聽in聽cursor.fetchall():
    26聽聽聽聽聽聽聽聽for聽item聽in聽record:
    27聽聽聽聽聽聽聽聽聽聽聽聽print聽item.encode('utf8')

    • 鍙傝?/li>
    http://mysql-python.sourceforge.net/MySQLdb.html
    http://bbs.phpchina.com/viewthread.php?tid=13861
    http://hi.baidu.com/ak456/blog/item/c318502394aa20569922ed7b.html




    ]]>
    娌℃湁root鏉冮檺鎬庝箞瀹夎python鐨勬ā鍧?/title><link>http://m.shnenglu.com/tangxinfa/articles/python_package_install_anywhere.html</link><dc:creator>鍞愭柊鍙?/dc:creator><author>鍞愭柊鍙?/author><pubDate>Wed, 15 Sep 2010 04:59:00 GMT</pubDate><guid>http://m.shnenglu.com/tangxinfa/articles/python_package_install_anywhere.html</guid><wfw:comment>http://m.shnenglu.com/tangxinfa/comments/126651.html</wfw:comment><comments>http://m.shnenglu.com/tangxinfa/articles/python_package_install_anywhere.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/tangxinfa/comments/commentRss/126651.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/tangxinfa/services/trackbacks/126651.html</trackback:ping><description><![CDATA[鍙互灝嗗寘瀹夎鍦ㄤ換鎰忕洰褰曪紝鍦╬ython2.4涓嬪皢MySQLdb瀹夎鍦▇/opt鐩綍涓紟<br /><div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">mkdir聽</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">p聽${HOME}</span><span style="color: rgb(0, 0, 0);">/</span><span style="color: rgb(0, 0, 0);">opt</span><span style="color: rgb(0, 0, 0);">/</span><span style="color: rgb(0, 0, 0);">lib</span><span style="color: rgb(0, 0, 0);">/</span><span style="color: rgb(0, 0, 0);">python2.</span><span style="color: rgb(0, 0, 0);">4</span><span style="color: rgb(0, 0, 0);">/</span><span style="color: rgb(0, 0, 0);">site</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">packages</span><span style="color: rgb(0, 0, 0);">/</span><span style="color: rgb(0, 0, 0);"><br />echo聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">PYTHONPATH=\$PYTHONPATH:\${HOME}/opt/lib/python2.4/site-packages/</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">>></span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">~/</span><span style="color: rgb(0, 0, 0);">.bashrc<br />echo聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">export聽PYTHONPATH</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">>></span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">~/</span><span style="color: rgb(0, 0, 0);">.bashrc<br />echo聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">export聽PATH=\$PATH:\${HOME}/opt/bin</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">>></span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">~/</span><span style="color: rgb(0, 0, 0);">.bashrc<br />source聽</span><span style="color: rgb(0, 0, 0);">~/</span><span style="color: rgb(0, 0, 0);">.bashrc<br />easy_install聽</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">prefix</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">${HOME}</span><span style="color: rgb(0, 0, 0);">/</span><span style="color: rgb(0, 0, 0);">opt聽MySQL</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">python</span></div><br /><img src ="http://m.shnenglu.com/tangxinfa/aggbug/126651.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/tangxinfa/" target="_blank">鍞愭柊鍙?/a> 2010-09-15 12:59 <a href="http://m.shnenglu.com/tangxinfa/articles/python_package_install_anywhere.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>emacs鐨剆hell/eshell涓嬫墽琛宲ython鑴氭湰鏃犳硶瀹炴椂鏄劇ず杈撳嚭鐨勫師鍥犲強瑙e喅鍔炴硶http://m.shnenglu.com/tangxinfa/articles/57758.html鍞愭柊鍙?/dc:creator>鍞愭柊鍙?/author>Fri, 01 Aug 2008 06:44:00 GMThttp://m.shnenglu.com/tangxinfa/articles/57758.htmlhttp://m.shnenglu.com/tangxinfa/comments/57758.htmlhttp://m.shnenglu.com/tangxinfa/articles/57758.html#Feedback0http://m.shnenglu.com/tangxinfa/comments/commentRss/57758.htmlhttp://m.shnenglu.com/tangxinfa/services/trackbacks/57758.html銆銆鍦╡macs(鎴戠敤鐨勬槸ntemacs23)鐨剆hell鎴杄shell涓嬶紝閫氳繃python test.py鏂瑰紡鎵цpython鑴氭湰錛?br>璇ヨ剼鏈殑鏍囧噯杈撳嚭錛堥氳繃print璇彞錛変笉浼氶┈涓婃樉紺猴紝鑰屾槸鍦ㄨ鑴氭湰鎵ц瀹屾瘯鏃舵墠鏄劇ず錛屼粠鑰屽鑷寸敤鎴鋒棤娉曡幏
    鐭ヨ剼鏈殑榪愯鐘舵侊紟
    鍘熷洜錛?br>銆銆鍙傝僪ttp://coding.derkeiler.com/Archive/Python/comp.lang.python/2003-12/2978.html
    瑙e喅鏂規硶錛?br>銆銆鍔?u鍙傛暟錛?br>銆銆濡傦細python -u test.py




    ]]>
    web.py鍒嗘瀽http://m.shnenglu.com/tangxinfa/articles/56306.html鍞愭柊鍙?/dc:creator>鍞愭柊鍙?/author>Wed, 16 Jul 2008 07:47:00 GMThttp://m.shnenglu.com/tangxinfa/articles/56306.htmlhttp://m.shnenglu.com/tangxinfa/comments/56306.htmlhttp://m.shnenglu.com/tangxinfa/articles/56306.html#Feedback0http://m.shnenglu.com/tangxinfa/comments/commentRss/56306.htmlhttp://m.shnenglu.com/tangxinfa/services/trackbacks/56306.html    涓葷嚎紼嬪垱寤虹殑web鏈嶅姟瀵硅薄錛堢被CherryPyWSGIServer鐨勫疄渚嬶級鍒涘緩鏁頒釜錛堥粯璁や負10錛夊伐浣滅嚎紼嬪璞″強涓涓繛鎺ラ槦鍒楋紟web鏈嶅姟瀵硅薄鎺ユ敹鏉ヨ嚜瀹㈡埛绔殑榪炴帴錛岀劧鍚庡皢璇ヨ繛鎺ュ璞℃斁鍒拌繛鎺ラ槦鍒椾腑錛屽伐浣滅嚎紼嬩粠榪炴帴闃熷垪涓彇璧頒竴涓繛鎺ュ璞★紝鐒跺悗涓鴻繖涓鎴穐ttp榪炴帴鏈嶅姟錛堝鐞唄ttp錛夛紟榪欐槸鍏稿瀷鐨勭敓浜ц咃紞娑堣垂鑰呮ā寮忥紟





    ]]>
    涓嶄竴鏍風殑python錛嶅嚱鏁伴粯璁ゅ?/title><link>http://m.shnenglu.com/tangxinfa/articles/56271.html</link><dc:creator>鍞愭柊鍙?/dc:creator><author>鍞愭柊鍙?/author><pubDate>Wed, 16 Jul 2008 01:57:00 GMT</pubDate><guid>http://m.shnenglu.com/tangxinfa/articles/56271.html</guid><wfw:comment>http://m.shnenglu.com/tangxinfa/comments/56271.html</wfw:comment><comments>http://m.shnenglu.com/tangxinfa/articles/56271.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/tangxinfa/comments/commentRss/56271.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/tangxinfa/services/trackbacks/56271.html</trackback:ping><description><![CDATA[棣栧厛鐪嬩緥瀛愶細<br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #008080;">1</span> <span style="color: #0000ff;">def</span><span style="color: #000000;"> modify_default_value(param</span><span style="color: #000000;">=</span><span style="color: #000000;">[]):<br></span><span style="color: #008080;">2</span> <span style="color: #000000;">     param.append(</span><span style="color: #800000;">'</span><span style="color: #800000;">value</span><span style="color: #800000;">'</span><span style="color: #000000;">)<br></span><span style="color: #008080;">3</span> <span style="color: #000000;">     </span><span style="color: #0000ff;">print</span><span style="color: #000000;"> param<br></span><span style="color: #008080;">4</span> <span style="color: #000000;">modify_default_value()<br></span><span style="color: #008080;">5</span> <span style="color: #000000;">modify_default_value()</span></div> 杈撳嚭錛?br>['value']<br>['value', 'value']<br>涓轟粈涔堢浜岃緭鍑轟細涓庣涓琛岃緭鍑轟笉涓鏍鳳紵鏈夌偣榪濆弽鐩磋錛屼笉鏄悧錛?br>鍦╬ython涓弬鏁伴粯璁?span style="font-weight: bold;">鍊?/span>瀛樺偍鍦ㄥ嚱鏁板璞¢噷錛屽綋榪欎釜鍊兼槸涓彲淇敼瀵硅薄錛坢utable object錛夋椂錛堝錛歭ist錛宒ictionary錛夛紝鍑芥暟涓榛樿鍙傛暟鍊肩殑淇敼浼氬交搴曞湴鏀瑰彉榪欎釜鍑芥暟鐨勫弬鏁伴粯璁ゅ鹼紝榪欎篃灝辨槸涓轟粈涔堢浜屾璋冪敤modify_default_value杈撳嚭浼氫笉涓鏍蜂簡錛庝負浜嗘洿濂藉湴鐞嗚В鍑芥暟鍙傛暟榛樿鍊鹼紝璇曡瘯浠庡嚱鏁板閮ㄦ帰鏌ヤ竴涓嬪嚱鏁扮殑鍙傛暟榛樿鍊鹼細<br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">print</span><span style="color: #000000;"> modify_default_value.func_defaults</span></div> 杈撳嚭錛?br>['value', 'value']<br><br><br><br> <img src ="http://m.shnenglu.com/tangxinfa/aggbug/56271.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/tangxinfa/" target="_blank">鍞愭柊鍙?/a> 2008-07-16 09:57 <a href="http://m.shnenglu.com/tangxinfa/articles/56271.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>PyInstaller鎵撳寘絎笁鏂規ā鍧梐dodbhttp://m.shnenglu.com/tangxinfa/articles/56115.html鍞愭柊鍙?/dc:creator>鍞愭柊鍙?/author>Mon, 14 Jul 2008 08:58:00 GMThttp://m.shnenglu.com/tangxinfa/articles/56115.htmlhttp://m.shnenglu.com/tangxinfa/comments/56115.htmlhttp://m.shnenglu.com/tangxinfa/articles/56115.html#Feedback0http://m.shnenglu.com/tangxinfa/comments/commentRss/56115.htmlhttp://m.shnenglu.com/tangxinfa/services/trackbacks/56115.html濡?span style="font-family: monospace;">璋冪敤__import__錛宔xec錛宔val鍑芥暟錛嶱yInstaller瀵逛簬榪欑鎯呭喌浼氬湪warn*.txt鏃ュ織涓暀涓嬩竴鍙ヨ鍛婏細W: delayed  __import__ hack detected at line 0 - adodb (D:\Program Files\Python25\Lib\site-packages\adodb\adodb.pyc)
    榪欏彞璀﹀憡璇存槑浜哸dodb.py涓氳繃闈炲父鎵嬫瀵煎叆浜嗕竴涓湭鐭ユā鍧楋紟閫氳繃鏌ョ湅adodb.py鍙戠幇瀹冪‘瀹炴槸閫氳繃__import__瀵煎叆浜嗕竴涓ā鍧楋細adodb_odbc錛?br>瑙e喅璇ラ棶棰樼殑姝ラ濡備笅錛屽湪PyInstaller鏍圭洰褰曠殑hooks鍐欎竴涓悕涓篽ook-adodb.py鐨勬枃浠跺唴瀹逛負錛?br>hiddenimports = ['adodb_odbc']
    鍦ㄨ繖涓洰褰曚笂鍙互鍙戠幇PyInstaller瀵逛簬璇稿宸茬煡妯″潡宸茬粡鍐呯疆鎻愪緵浜嗙浉搴旂殑hook鏂囦歡錛?br>鎺ヤ笅鏉ュ垹闄ゆ墦鍖呮墍鐢熸垚鐨勪竴浜涙枃浠訛紝鍐嶆鎵ц鎵撳寘榪囩▼錛孫K錛?br>
    涓浜涙劅鎯籌細瀵逛簬闈瀙ython欏圭洰錛屽彲浠ュ皾璇曠敤Python榪涜蹇熷師鍨?/span>
    寮鍙?/span>錛屽楠岃瘉綆楁硶絳夛紝褰撻」鐩湡闄愬皢鑷蟲椂錛岃漿鍖栦負鍏跺畠璇█鐨勬椂闂翠笉澶熸椂錛屽彲鐢≒yInstaller灝嗚繖涓狿ython紼嬪簭杞寲涓篹xe錛岀劧鍚庡皢榪欎釜exe鍒嗗彂緇欐渶緇堢敤鎴鳳紝榪欐牱瀵瑰凡鏈夌殑緋葷粺甯冪講涓嶄細閫犳垚榪囧ぇ鐨勫啿鍑伙紟




    ]]>
    91视频国产91久久久| 久久九九精品99国产精品| 亚洲嫩草影院久久精品| 久久91精品综合国产首页| 久久久久亚洲国产| 精品综合久久久久久97超人| 久久精品国产国产精品四凭| 国产成人精品三上悠亚久久| 久久精品无码一区二区日韩AV| 精品伊人久久久| 国产精久久一区二区三区| 久久精品中文字幕一区| 久久精品国产影库免费看| 中文精品99久久国产 | 青青草国产成人久久91网| 久久人人青草97香蕉| 99久久精品久久久久久清纯| 国产精品久久久香蕉| 精品久久人人妻人人做精品| 久久99亚洲网美利坚合众国| 亚洲国产精品无码久久久久久曰| 麻豆精品久久精品色综合| 久久久久亚洲AV成人片| 久久久久人妻一区二区三区 | 久久精品无码专区免费青青| 一本色综合久久| 国産精品久久久久久久| 91久久成人免费| 日韩一区二区久久久久久| 国产精品99久久久久久人| 亚洲第一极品精品无码久久| 香蕉久久永久视频| 久久一本综合| 亚洲午夜精品久久久久久app| 亚洲美日韩Av中文字幕无码久久久妻妇 | 精品久久久久久久久久中文字幕| 乱亲女H秽乱长久久久| 亚洲国产一成人久久精品| 国内高清久久久久久| 久久久精品国产免大香伊 | 久久精品国产亚洲综合色|