Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÖеÄUnicodeÔÚDelphiÈçºÎ»¹Ô­³ÉGb2312£¿

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

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

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 ......

pythonÔõôprint 'hello world'

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

È¡µÃPython´úÂë¶ÎµÄÕýÔò±í´ïʽ?

È磺
def aa(i):
print i
a=[1,2,3]
b=2
c=3
ÄÜʶ±ð³öÆðʼλdef aa(i):
ºÍ½áÊøλ" a=[1,2,3]"£¿
ÏñPython¶ÔÓï·¨ÕâôҪÇóÑϸñµÄÎÒ¾õµÃ¾Í²»ÒªÓÃÕýÔòÁË£¬Ð§Âʲ»¸ß¡£Ö±½ÓÓÃÅжϾͿÉÒÔÁË£¬Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ