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

pythonÓÃsax °üÀ´½âÎöxml µÄÎÊÌâ ÇëÖ¸½Ì ¼± ¶àл

ÎÒÏëÓÃsax°üÀ´½âÎöxml, ÒªÇóÈçÏÂ:
Python code:

<?xml version="1.0" encoding="UTF-8"?>
<waf>
<policy> acl </policy>
<prot>
<dstip>2.2.2.2</dstip>
<dstip>3.3.3.3</dstip>
<dstport>80</dstport>
<srcip>3.3.3.3</srcip>
<srcport>8888</srcport>
<protocol>17</protocol>
</prot>
<other haha="google.com" test_case_id="1" >
<action>0</action>
<dstip>33333333</dstip>
<res>0</res>
<res a="b" b="2" >0</res>
<res a="c" b="3" c="4" >88</res>
<res a="b" b="2" >0</res>

</other>
<other heihei="google.com" test_case_id2="2" >
<res a="b" b="2" >0</res>
</other>
<other heihei3="baidu.com" test_case_id3="3" >
<res a="c" b="3">88</res>
<dd gg = "pengwei" >wpw</dd>
</other>
<m>
<w>
<dd gg = &qu


Ïà¹ØÎÊ´ð£º

pythonÖÐÏß³ÌÎÊÌ⣿£¿

ÎÒÏÖÔÚÊÇÕâÑùµÄ
¿ªÁËÒ»¸ö×ÓỊ̈߳¬¶ÁÈ¡ÏÂÃæµÄÏûÏ¢
±¾ÒâÊÇ
Python code:

while not self._stopevent.isSet( ):
re=¶ÁȡϲãÏûÏ¢
if re>0:
´¦Àí
else:
pass

¼ÙÈ ......

PythonÖеÄUnicodeÔÚDelphiÈçºÎ»¹Ô­³ÉGb2312£¿

ÒÑÖªPython ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ

ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô­³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨
......

[ÌáÎÊ]Python ÈçºÎºöÂÔ whitespace ¶ÁÈë

Ïñ C µÄ scanf() ÄÇÑù
±ÈÈç¶ÁÈë 1 2 3 a b c
ÿ´Î¶ÁÈëÒ»¸ö
ÏÂÃæÕâ¸öÓ¦¸ÃÊÇÄãÏëÒªµÄ°É£º
Python code:

>>> k = raw_input()
0 0123 ds dsl sd
>>> k
'0 0123 ds dsl sd'
>>> ......

c++ÖÐǶÈëpythonÄ£¿éÖ¸ÕëΪ¿Õ,Ϊʲô

#include <Python.h>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
vector <string> ......

IIS 7 python 2.6 cgi ÎļþÉÏ´«ÎÊÌâ

ÎÒÿ´ÎÉÏ´«µÄÎļþ¶Áµ½µÄÊý¾Ý¶¼²»ÕýÈ·¡£2M µÄͼƬ¶ÁµÃ10¶àK ¡£¡£ÄÄλ´óÏÀ¿ÉÒÔ°ï°ïÎÒ°¡¡£
#!D:\ProgrammerTools\python26\python.exe
#encoding=utf-8
import cgitb
import os
cgitb.enable()
import cgi,urllib ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ