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 code:
while not self._stopevent.isSet( ):
re=¶ÁȡϲãÏûÏ¢
if re>0:
´¦Àí
else:
pass
¼ÙÈ ......
ÒÑÖªPython ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ
ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨
......
Ïñ C µÄ scanf() ÄÇÑù
±ÈÈç¶ÁÈë 1 2 3 a b c
ÿ´Î¶ÁÈëÒ»¸ö
ÏÂÃæÕâ¸öÓ¦¸ÃÊÇÄãÏëÒªµÄ°É£º
Python code:
>>> k = raw_input()
0 0123 ds dsl sd
>>> k
'0 0123 ds dsl sd'
>>> ......
#include <Python.h>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
vector <string> ......
ÎÒÿ´ÎÉÏ´«µÄÎļþ¶Áµ½µÄÊý¾Ý¶¼²»ÕýÈ·¡£2M µÄͼƬ¶ÁµÃ10¶àK ¡£¡£ÄÄλ´óÏÀ¿ÉÒÔ°ï°ïÎÒ°¡¡£
#!D:\ProgrammerTools\python26\python.exe
#encoding=utf-8
import cgitb
import os
cgitb.enable()
import cgi,urllib ......