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

ʹÓÃpython 3.0 ´¦Àíutf8¸ñʽµÄÎļþBOMÎÊÌâ

×î½üÏÂÔØÁËÒ»·Ý×îеÄpython3.0Íæ¶ù
ûÏëµ½print(Hello world)¾ÍÄÑΪÁËÎÒ°ëÌì
ÎÊÌâ1£¬printº¯Êý
ºóÀ´¿´ÁËһϸüеÄÎĵµ²ÅÖªµÀ£¬3.0ÒÔºóprintÒѾ­±»·â×°³Éº¯ÊýÁË
¶øÎÒ»¹Ò»Ö±Ï°¹ß2.6µÄ print 'Hello World'ÐÎʽ£¬ º¹Ò»¸ö£¡
ÎÊÌâ2£¬notepadµÄutf8¸ñʽ
ÎÒʹÓÃnotepadдÁ˸ö²âÊÔÎļþ£¬±£´æΪutf8¸ñʽ
¸ñʽ´ó¸ÅÊÇ:
test  :
test    :
test:
Ö®ºóдÁ˸öÕýÔò
'^[a-z]* *:'
·¢ÏÖÔõôҲƥÅä²»³öÀ´
Ñо¿ÁËÒ»¸öÍíÉÏÖÕÓÚ·¢ÏÖ£¬notepad µÄ utf8 ÔÚÎļþµÄ¿ªÍ·Ôö¼ÓÁËÈý¸ö×Ö½Ú ¾ÍÊÇËùνµÄBOM
ÕâÈý¸ö×Ö½ÚÔÚÎı¾¸ñʽÖÐÊDz»ÏÔʾµÄ£¬Ê¹ÓÃUE½«Îı¾ÎļþתΪÎÞBOMµÄutf8¼´¿É
ÁíÍ⣬ʹÓÃpython´ò¿ªutf8¸ñʽµÄÎļþ£¬Èç¹ûÏ£ÍûÏÔʾÕý³£ÐèÒªÔÙopenµÄ²ÎÊýÖÐÖ¸¶¨µÚËĸö²ÎÊýΪ'utf8'
ÀýÈç
f = open('test.txt', 'r', 2, 'utf8')


Ïà¹ØÎĵµ£º

Python 3 ³õ̽£¬µÚ 1 ²¿·Ö: Python 3 µÄÐÂÌØÐÔ

Python 3 ÊÇ Guido van Rossum ¹¦ÄÜÇ¿´óµÄͨÓñà³ÌÓïÑÔµÄ×îа汾¡£ËüËäÈ»´òÆÆÁËÓë 2.x °æ±¾µÄÏòºó¼æÈÝÐÔ£¬µ«È´ÇåÀíÁËijЩÓï·¨·½ÃæµÄÎÊÌâ¡£±¾ÎÄÊÇϵÁÐÎÄÕÂÖеĵÚһƪ£¬½éÉÜÁËÓ°Ïì¸ÃÓïÑÔ¼°Ïòºó¼æÈÝÐԵĸ÷Öֱ仯£¬²¢ÇÒ»¹ÌṩÁËÐÂÌØÐԵļ¸¸öÀý×Ó¡£
Python °æ±¾ 3£¬Ò²±»³ÆΪ Python 3000 »ò Py3K£¨·ÂЧ Microsoft® Windows ......

python mysqlµ¼ÈëÊý¾Ý

[root@pku-fan MySQL]# cat limbs.sql
CREATE DATABASE cookbook;
USE cookbook;
DROP TABLE IF EXISTS limbs;
CREATE TABLE limbs
(
    thing   VARCHAR(20),    # what the thing is
    legs    INT,     ......

pythonÄ£¿éÖ®ConfigParser ini

תÔØ×Ô£ºhttp://hi.baidu.com/myitlyj/blog/item/25586bd7088ba3dba044df6b.html
ÔÚ³ÌÐòÖÐʹÓÃÅäÖÃÎļþÀ´Áé»îµÄÅäÖÃһЩ²ÎÊýÊÇÒ»¼þºÜ³£¼ûµÄÊÂÇ飬ÅäÖÃÎļþµÄ½âÎö²¢²»¸´ÔÓ£¬ÔÚpythonÀï¸üÊÇÈç´Ë£¬ÔÚ¹Ù·½·¢²¼µÄ¿âÖоͰüº¬ÓÐ×öÕâ¼þÊÂÇéµÄ¿â£¬ÄǾÍÊÇConfigParser£¬ÕâÀï¼òµ¥µÄ×öһЩ½éÉÜ¡£
ConfigParser½âÎöµÄÅäÖÃÎļþµÄ¸ñÊ ......

pythonºÍdotnetµÄwebservice»¥·Ã

2007-08-22 22:46
Ò»¡¢ÓÃSOAPpy·ÃÎÊdotnet webservice
      dotnetµÄwebservice
      <WebMethod()> _
      Public Function HelloWorld() As String
          Return "H ......

cÓïÑÔÄ£Äâperl pythonÖеÄÊý×鸺ÊýË÷Òý

int main()
{
int a[] = {1,2,3,4,5};
int i;
int * p = a;
for (p = a + 4, i = 0; i < 5; i++) {
printf("%d ",p[-i]);
}

return 0;
}

......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ