PythonÖÐÎÄÎÊÌâ
ÔÎÄÁ´½Ó
Ôø¾ÔÚÉîÈëdz³öjavaÖÐÎÄÎÊÌâ
ϵ
ÁÐÖÐÑо¿¹ýjavaµÄÖÐÎÄÎÊÌ⣬ÏÖÔÚÖÐÎÄÎÊÌâÒѾ²»ÔÙî¿°íÎÒÔÚjavaÊÀ½çÖÐÂþÓεĽŲ½ÁË¡£×î½ü£¬¶ÔPython²úÉúÁËŨºñµÄÐËȤ£¬ËÖªµÀ¸úÖÐÎÄÎÊÌâÕâ¸ö
ÀÏÅóÓÑÓÖÒ»´Î²»ÆÚ¶øÓö¡£¿´À´£¬ÔÚ´úÂëÊÀ½çÖУ¬ÖÐÎÄÎÊÌâ»áÔںܳ¤Ò»¶Îʱ¼äÀï¸úÎÒÃÇÐÎÓ°²»Àë¡£ÕâÒ²Äѹ֣¬ËÈõ±³õ·¢Ã÷¼ÆËã»úµÄ²»ÊÇÎÒÃÇÖйúÈËÄØ£¬·ñÔò£¬ÏÖÔÚÈ«
ÊÀ½çµÄ¼ÆËã»ú¶¼Ö§³Ö¶øÇÒ±ØÐëÖ§³ÖGBK£¬ÕâÑù£¬Ð´ÕâÑùÎÄÕµÄÈ˾Ͳ»»áÊÇÎÒÁË£¬¶øÊÇ´óÑó±Ë°¶µÄÒ»¸ö½ð·¢±ÌÑ۵ijÌÐòÔ±£¬¶øÇÒ±êÌâÒ²ÏàÓ¦¸ÄΪ
“studying the english problem in '´óòþ' ”¡£¡£¹þ¹þ
YY¶øÒÑ£¬»¹ÊÇÃæ¶ÔÏÖʵÎÊÌâ°É¡£Ïà¶Ôjava¶øÑÔ£¬ÖÐÎÄÎÊÌâÔÚPythonÖеıíÏÖ¸üΪ¼¤ÁÒ¡£“¼¤ÁÒ”µÄÒâ˼²»ÊÇ˵¸üΪÑÏÖØ»òÕß˵ÄÑÓÚ½â¾ö£¬Ö»ÊÇ
Python¶ÔÓÚdecode£¦encode´íÎóµÄĬÈÏ´¦Àí·½Ê½Îªstrict£¬Ò²¾ÍÊÇÖ±½Ó±¨´í£¬¶øjavaʹÓÃreplaceµÄ·½Ê½À´´¦ÀíÁË£¬Òò´Ë
java³öÏÖÖÐÎÄÎÊÌâºó»á´òÓ¡³öºÜ¶à"??"¡£´ËÍ⣬PythonµÄĬÈϵÄencodingÊÇASCII£¬¶øjavaµÄĬÈÏencoding¸ú²Ù×÷ϵͳµÄ
encodingÊÇÒ»Öµġ£ÔÚÕâÒ»µãÉÏ£¬ÎÒ¾õµÃjava¸üΪºÏÀí£¬ÕâÑù¶Ô³ÌÐòÔ±¸üΪÓѺã¬Ò²¼õÉÙÁËnewbies
¿ªÊ¼Ê±µÄ´ìÕ۸У¬ÊÇÓÐÀûÓÚÓïÑÔµÄÍƹãµÄ¡£µ«ÊÇ£¬PythonÒ²ÓÐËüµÄµÀÀí£¬±Ï¾¹ASCIIÊÇΨһµÄÈ«ÊÀ½çËùÓÐƽ̨¶¼Ö§³ÖµÄ×Ö·û¼¯£¬¶øÇÒÎÊÌâʼÖÕÊÇÎÊÌ⣬ʼ
ÖÕ»á³öÏֵģ¬ÌÓ±ÜËü»¹²»ÈçÔçµãÃæ¶ÔËü¡£
ºÃÁË£¬ËµÁËÕâô¶à£¬¸Ã˵˵PythonÖÐÖÐÎÄÎÊÌâµÄÖ¢×´ÁË¡£ÔÚÕâ֮ǰ£¬ÎÒÃÇÏÈÒªÁ˽âPythonÖÐÓÐÁ½ÖÖ×Ö·û´®£¬·Ö±ðÊÇÒ»°ãµÄ×Ö·û´®£¨Ã¿¸ö×Ö·ûÓÃ8
bits±íʾ£©ºÍUnicode×Ö·û´®£¨Ã¿¸ö×Ö·ûÓÃÒ»¸ö»òÕ߶à¸ö×Ö½Ú±íʾ£©£¬ËüÃÇ¿ÉÒÔÏ໥ת»»¡£¹ØÓÚUnicode£¬Joel Spolsky ÔÚ The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
ÖÐÓÐÉú¶¯µÄ˵Ã÷£¬Jason Orendorff ÔÚ Unicode for programmers
ÓÐןüΪȫÃæµÄÃèÊö£¬ÔÚ´ËÎҾͲ»ÔÙ¶à˵ʲôÁË¡£À´¿´ÏÂÃæµÄ´úÂ룺
x = u"ÖÐÎÄÄãºÃ"
print s
ÔËÐÐÉÏÊö´úÂ룬Python»á¸ø³öÏÂÃæµÄ´íÎóÌáʾ
SyntaxError:
Non-ASCII character '\xd6' in file
G:\workspace\chinese_problem\src\test.py on line 1, but no encoding
declared; see http://www.python.org/peps/pep-0263.html
for details
˵ÊÇÓöµ½·Ç
Ïà¹ØÎĵµ£º
×÷Ϊһ¸ö³õѧshellµÄ³ÌÐòÔ±À´Ëµ£¬Ê¹ÓÃshellµÄһЩÃüÁîµ÷Ó㬱ÈÈç¾Íд¼¸ÐУ¬×öһЩ×Ô¶¯»¯µÄ²Ù×÷£¬¼òµ¥ÓÖʵÓ㬵«ÊÇÉæ¼°Âß¼¿ØÖƺÍ
×Ö·û´®´¦Àíʱ£¬¿´µ½ÄÇif/fi£¬case£¯esac……»¹ÓйÅÀë¹Å¹ÖµÄ²¼¶ûÅжυ…»¹Óи´ÔÓ¶øÓÖÃû×ÖºÜÏì¶øÇÒºÜÀÏ×ʸñµÄsed¡¢awk……ÎÒ¾ÍÏ룬
ÔÚûÓзÇÒªÔÚshellÖÐ ......
ÔÚparamikoÖÐʹÓÃÓû§ÃûºÍÃÜÂëͨ¹ýsftp´«ÊäÎļþ£¬²»Ê¹ÓÃkeyÎļþ¡£
import getpass
import select
import socket
import traceback
import paramiko
def putfile():
#import interactive
# setup logging
paramiko.util.log_to_file('demo.log')
username = username
hostname = hostname
......
½ñÌìͻȻÓÐÒ»¸öÏë·¨£¬¾ÍÊÇÏë×Ô¼ºÐ´Ò»¸ö·Òë½Å±¾¡£¿ÉϧGoogleÌṩµÄAPIÊǹ©ÍøÂçÓ¦Óõġ£¸ÕºÃÔÚ¡¶dive into python¡·ÀïÃæÕâ±¾ÊéÀïÃæ¿´µ½ÈçºÎ´ÓHTMLÎĵµÖÐÌáÈ¡³öÀ´×Ô¼ºÏëÒªµÄÄÚÈÝ£¬ÄÇÕâÑùµÄ»°£¬¿É²»¿ÉÒÔÄ£Äâä¯ÀÀÆ÷À´·¢ËÍÏë·ÒëµÄ¾ä×Ó£¬È»ºóÔÙ½ÓÊÕ·µ»Ø½á¹ûºóµÄHTMLÔ´Â룬×îºó´ÓÖÐÌáÈ¡³ö·ÒëµÄ½á¹ûÄØ£¿¡¡¡¡ÆäʵÊÇÐеģ¬ÒòΪÀûÓ ......
1¡¢ÏÂÔØoracleÈí¼þ
http://www.oracle.com/technology/software/tech/oci/instantclient/index.html
oracle-instantclient-basic-10.2.0.4-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm
oracle-instantclient-devel-10.2.0.4-1.i386.rpm
2¡¢°²×°rpm°ü
rpm -ivh oracle-instantclient-basic-10.2.0.4 ......