Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Python Unicode±àÂëÎÊÌâ

Ç°¼¸Ìì¸Õ¸Õ½Ó´¥Python£¬ºÃ¶àÎÊÌâ²»Ã÷°×
´úÂëÈçÏ£¬¿ÉÒÔÕý³£Êä³ösheetname.Èç¹û°Ñ±àÂ뷽ʽ¸Ä³Éutf16¾Í»á±¨´í
TypeError: compile() expected string without null bytes
ÇëÎÊÊÇΪʲô£¿
»¹ÓÐÊä³öµØÄÚÈÝÊÇ[u'10069', u'\u53f0\u5317\u5e02', u'\u4e2d\u6b63\u5340', u'\u4e2d\u83ef\u8def', u'\u4e2d\u83ef\u8def\uff12\u6bb5', u'\u4e2d\u83ef\u8def\u4e8c\u6bb5', u'\u3000', u'1\u865f', u'1\u865f']
Ϊʲô²»ÊÇ·±Ìå×Ö·û£¿

»¹ÓÐÔÚWindowsÏÂʹÓÃPython£¬¡°#!/usr/bin/python¡±ÕâÒ»¾äÊDz»ÊǾͲ»Ó¦¸ÃÕâÑùд£¿


#!/usr/bin/python
# -*- coding: utf8 -*-
# Filename : xlTest.py

import xlrd

workbook = xlrd.open_workbook(u'C:\Documents and Settings\Administrator\×ÀÃæ\TWN_ID\TWN_RdSt_5.xls')

print workbook.sheet_names()

sheet = workbook.sheet_by_name(u'Rd_St')
for rownum in range(sheet.nrows):
    print sheet.row_values(rownum)

Á˽âÁË£¬Ð»Ð»


Ïà¹ØÎÊ´ð£º

³ÏÕÐPython³ÌÐòÔ±²ÎÓë¼ÆËã»úÊé¼®³ö°æ

ÓźñµÄ¸å³ê£¬³ÏÕÐPython¼¼ÊõÈËÔ±²ÎÓë¸÷ÖÖ¼¼ÊõÊé¼®³ö°æ¡£ 
ͨ¹ý¸ÃÊé¼®£¬×÷Õß¿ÉÒԵõ½Èçϱ¨³ê£º 
1¡¢·áºñµÄ¸å³ê¡£ 
2¡¢Êé¼®Öø×÷µÄÊðÃûȨ¡£ 
3¡¢¶Ô×÷ÕߺÍÊé½øÐÐÐû´«£¬Ìá¸ß×÷ÕßÔÚ¼¼ÊõȦ×ÓÀ ......

¾«ÐÄËѼ¯µÄѧϰpythonµÄ7±¾Êé

ѧϰpythonµÄ7±¾Êé
°üÀ¨6±¾chm£¬Ò»±¾pdf×ÊÁÏ
¶ÔѧϰpythonÓкܴóµÄ°ïÖú 
http://download.csdn.net/source/619791
¾«ÐÄËѼ¯£¬²»Òª»ý·Ö£¬ÄóöÀ´·ÖÏí
лл¥Ö÷£¬ÐÁ¿àÁË~



lz ×îºÃ°ÑÊéÃûºÍ¼òµ¥½éÉܼÓÉ ......

ÇóÖúpython£¬map filter

map£¬filter·½·¨Ó¦¸Ã»á·µ»ØÒ»¸öÁÐ±í¡£
µ«ÊÇÔÚÎÒÕâÀËüÃÇ×ÜÊÇ·µ»Ø£º
<map object at 0x0000000002A2C978>
<filter object at 0x0000000002A2C9E8>
ÎÒÓõÄpython3.1£¬ Õâ¸öÒ²ÊÇ°æ±¾µÄ±ä¶¯µ¼ÖµÄÂ𣿠......

PythonÐÂÊÖ±¨µ½ ´ó¼ÒÍƼö¸öIDE

×î½üÒ»¸öÏîÄ¿ÂíÉϾÍÒªÓÃPython±àÁË ´ó¼ÒÍƼö¸öIDE¡£¡£¡£
1 Ãâ·Ñ¡£¡£¡£
2 Ìå»ý×îºÃСһµã
3 ¹¦ÄÜÇ¿´ó
£¨ÅÅÃû²»·ÖÏȺ󡣡£¡£·Ï»°¡£¡££©

emacs,×î´óµÄÓŵãÊÇÒòΪ·ÇͼÐνçÃ棬ÓÃSSHÔ¶³ÌµÇ¼Ҳ¿ÉÒÔʹÓá£ËùÒÔ¿ÉÒÔÓ ......

pythonÖеÄÀàÖÐÊôÐÔÔªËؼÓself.ºÍ²»¼Óself.µÄÇø±ð

ѧϰPyQt£¬·¢ÏÖÆäÖÐÒ»¶Î½Å±¾ÊÇÕâÑùµÄ£º
class Form(QDialog):
  ........
  amountLabel = QLabel("Amount")
  self.amountLabel = QLabel()
  ........
pythonÖеÄÀàÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ