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

×î¼òµ¥µÄ python ¶àÏß³ÌʾÀý

import time,thread
def test(a,b):
for i in range(a,b):
       time.sleep(1)
       print i
def start():
thread.start_new_thread(test,(1,1001))
thread.start_new_thread(test,(1000,2001))
if __name__=='__main__':
start()


Ïà¹ØÎĵµ£º

PythonÄ£¿éѧϰ

¡¡¡¡Python±ê׼ģ¿éÖУ¬Óжà¸öÄ£¿éÓÃÓÚÊý¾ÝµÄѹËõÓë½âѹËõ£¬Èçzipfile£¬gzip, bz2µÈµÈ¡£ÉϴνéÉÜÁËzipfileÄ£¿é£¬½ñÌì¾ÍÀ´½²½²zlibÄ£¿é¡£ zlib.compress(string[, level]) zlib.decompress(string[, wbits[, bufsize]]) ¡¡¡¡zlib.compressÓÃÓÚѹËõÁ÷Êý¾Ý¡£²ÎÊýstringÖ¸¶¨ÁËҪѹËõµÄÊý¾ÝÁ÷£¬²ÎÊýlevelÖ¸¶¨ÁËѹËõµÄ¼¶±ð£¬ËüµÄÈ ......

[ת] ×î¼òµ¥µÄʹÓÃUDPͨÐŵÄPython SocketÀý×Ó

À´Ô´£ºhttp://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
¿Í»§¶Ë³ÌÐò´úÂ룺
# Client program
from socket import *
# Set the socket parameters
host = "localhost"
port = 21567
buf = 1024
addr = (host,port)
# Create socket
UDPSock = socket(AF_INET,SOCK_DGRAM) ......

PythonÖÐSQLiteÊý¾Ý¿âʹÓóõ²½

SQLITEÊÇÒ»¿î·Ç³£Ð¡ÇɵÄǶÈëʽ¿ªÔ´Êý¾Ý¿âÈí¼þ£¬Ò²¾ÍÊÇ˵ûÓжÀÁ¢µÄά»¤½ø³Ì£¬ËùÓеÄά»¤¶¼À´×ÔÓÚ³ÌÐò±¾Éí¡£ËüʹÓÃÒ»¸öÎļþ´æ´¢Õû¸öÊý¾Ý¿â£¬²Ù×÷Ê®·Ö·½±ã¡£ËüµÄ×î´óÓŵãÊÇʹÓ÷½±ã£¬¹¦ÄÜÏà±ÈÓÚÆäËü´óÐÍÊý¾Ý¿âÀ´Ëµ£¬È·ÊµÓÐЩ²î¾à¡£µ«ÊÇÐÔÄܱíÏÖÉÏ£¬SQLITE²¢²»Ñ·É«¡£ÂéȸËäС£¬ÎåÔà¾ãÈ«£¬ sqlite ʵÏÖÁ˶àÊý sql-92 µÄ±ê×¼£¬±È ......

PythonÏ̱߳à³Ì£¨Ò»£©Ï̶߳ÔÏó

ÎÒÃÇÔÚ×öÈí¼þ¿ª·¢µÄʱºòºÜ¶àÒªÓõ½¶àÏ̼߳¼Êõ¡£ÀýÈçÈç¹û×öÒ»¸öÏÂÔØÈí¼þÏóflashget¾ÍÒªÓõ½¡¢ÏóÔÚÏßÊÓÆµ¹¤¾ßrealplayerÒ²ÒªÓõ½ÒòΪҪͬʱÏÂÔØmedia stream»¹Òª²¥·Å¡£ÆäʵÀý×ÓÊǺܶàµÄ¡£
Ïß³ÌÏà¶Ô½ø³ÌÀ´ËµÊÇ“ÇáÁ¿¼¶”µÄ£¬²Ù×÷ϵͳÓýÏÉÙµÄ×ÊÔ´´´½¨ºÍ¹ÜÀíÏ̡߳£³ÌÐòÖеÄÏß³ÌÔÚÏàͬµÄÄÚ´æ¿Õ¼äÖÐÖ´ÐУ¬²¢¹²ÏíÐí¶àÏà ......

pythonÀàÐÍת»»£¬ÊýÖµ²Ù×÷(ת)


http://hi.baidu.com/guzhilei1986/blog/item/8969b4debe99e150ccbf1ae7.html
º¯Êý                       ÃèÊö  
int(x [,base ])          ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ