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

Python×¥°üºÍ°ü½âÎö´úÂëµÄ±àд

ÄÄλǰ±²¿ÉÒÔ¸øÎÒ¸öPythonдµÄ¡¾¿ÉÔËÐеÄÔ´´úÂë¡¿£¬ÊµÏÖÒÔϹ¦ÄÜ£º

  1.¶ÔÖ¸¶¨¶Ë¿ÚµÄ¼àÌý²¢½ØÈ¡¡¾Ö¸¶¨¡¿Êý¾Ý°ü
  2.Äܶԡ¾×Ô¼º¶¨ÒåµÄ¡¿Ð­Òé°ü½øÐнâÎö
Íò·Ö¸Ðл£¡£¡£¡

ÎÒÀ´¶¥ thy38

ѧϰÁË£¡ÎÒÒ²ÕýºÃÓÐÓÃ

¸ãÕâ¸ö¸ÉÂïÓ𡣿£¿£¿£¿£¿£¿£¿£¿£¿

ºÙºÙºÙ~~

¸Ðлthy38£¬Ç°±²¹¦Á¦Ö®ÉîÈÃÎÒÇÕÅ壡£¡ÎÒÕýÔÚŬÁ¦µØ³ÉΪһ¸öÓÅÐãµÄPythonдÊÖ,ÒÔºó»¹Íû²»Áߴͽ̣¡Ð»Ð»£¡£¡

ÔõÒ»¸ö¸ßÊÖÁ˵ã¡£¡
ÒýÓÃ
Python code
import pcap
import dpkt

aaa='a'
bbb='b'
pc=pcap.pcap() #×¢£¬²ÎÊý¿ÉΪÍø¿¨Ãû£¬Èçeth0
pc.setfilter('tcp port 80') #ÉèÖüàÌý¹ýÂËÆ÷

for ptime,pdata in pc: #ptimeΪÊÕµ½Ê±¼ä£¬pdataΪÊÕµ½Êý¾Ý
p=dpkt.e¡­¡­





Ïà¹ØÎÊ´ð£º

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

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

pythonÔõôprint 'hello world'

´ó¼ÒºÃ£¬ÎÒÊÇÒ»¸öÐÂÊÖ£¬¸Õ¿ªÊ¼Ñ§python£¬µ«ÊǸտªÊ¼µÄhelloworld¶¼Ã»·¨´òÓ¡£¬ÈÃÎÒºÜÎÞÄΡ£
ÎÒµÄpython°²×°Â·¾¶Îªf:\python31¡£ÔÚpathÖÐÒ²ÉèÖöÔÁË£¬ÔÚwindowsÏÂÔËÐÐÊÇÕâÑùÏÔʾµÄ£¬Ï£Íû¸÷λǰ±²Ö¸µãһϡ£Ð»Ð»
Pyth ......

python ÕýÔòÆ¥ÅäÖÐÎÄ

ÔÚÎı¾ÎļþÖÐÆ¥ÅäÏî°üº¬ÖÐÎÄ
ÈçÄÚÈÝΪ£ºgamename=ÖÐÎÄ 
  key=ÌìÏÂ
Îı¾ÎļþµÄ±àÂëµÄÎļþΪutf-8
python´úÂëÈçÏ£º
# -*- coding:UTF-8 -*-
  contents=open(from_pa ......

pythonÖÐ×Ö·û´®±È½ÏµÄÎÊÌâµÄÎÊÌâ

ÒÔÏ´úÂëÊÇTk×öÁËÒ»¸ö¼òµ¥µÄÃÜÂëÑéÖ¤¹¦ÄÜ£¬ÊäÈëÒ»¸ö×Ö·û´®£¬²¢ÑéÖ¤ÆäÊÇ·ñÕýÈ·£¬ÇëÏÈ¿´´úÂ룺
Python code:

from tkinter import *
root = Tk()
e = StringVar()
t = 'cashlu'
def yanzheng():
if e ......

python½âÎöxmlÎļþ

ʹÓÃxml.dom½âÎö¼¸Õ×µÄxmlÎļþ£¬·Ç³£»ºÂý£¬ÓÐÖÖ¼ÙËÀµÄ¸Ð¾õ¡£Ôõô½â¾ö£¿ÓÃÆäËû¿âÊÇ·ñ»áºÃЩ£¬ÔÝʱֻ֪µÀÕâ¸ö¿âµÄ¡£
Äã¿ÉÒÔÊÔÒ»ÏÂElementTree


pythonµÄ¹Ù·½Àý×Ó
import xml.parsers.expat

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