×î¼òµ¥µÄ 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±ê׼ģ¿éÖУ¬Óжà¸öÄ£¿éÓÃÓÚÊý¾ÝµÄѹËõÓë½âѹËõ£¬Èçzipfile£¬gzip, bz2µÈµÈ¡£ÉϴνéÉÜÁËzipfileÄ£¿é£¬½ñÌì¾ÍÀ´½²½²zlibÄ£¿é¡£ zlib.compress(string[, level]) zlib.decompress(string[, wbits[, bufsize]]) ¡¡¡¡zlib.compressÓÃÓÚѹËõÁ÷Êý¾Ý¡£²ÎÊýstringÖ¸¶¨ÁËҪѹËõµÄÊý¾ÝÁ÷£¬²ÎÊýlevelÖ¸¶¨ÁËѹËõµÄ¼¶±ð£¬ËüµÄÈ ......
Python
µÄ
C/C++
À©Õ¹
By phidoit@gmail.com
¿ÉÀ©Õ¹ÐÔÊÇ
Python
µÄÒ»´óÌØÉ«£¬Ò»·½Ã棬ÓÉÓÚ
Python
ÊǽâÊÍÖ´Ðеģ¬Õâµ¼ÖÂÔËÐÐËÙ ......
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from ftplib import FTP
from os import path
from optparse import OptionParser
from FtpDownload import spilt_cmd
import socket
import sys
'''
ÉÏ´«ÖÕ¶ËMRÎļþµ½·þÎñÆ÷
V1.0 zhai 2009-07-27
'''
def main():
&nbs ......
PythonÓïÑÔÖУ¬Á¬±äÁ¿ºÍËüµÄ¸³Öµ¶¼ÊǺÜÓÐÒâ˼µÄÊÂÇé¡£
ÄãÖ»ÐèÒªÔÚʹÓÃËüµÄʱºòÈÓ¸øËüÒ»¸öÖµ£¬È»ºóÔÚËüµÄ×÷ÓÃÓòÄÚʹÓÃËü¡£ÆäËûµÄÊÂÇé²»ÐèÒªµ£ÐÄ¡£python½âÊÍÆ÷»áÍê³ÉʣϵÄÊÂÇé¡£
1. >>>x = 1
2. >>>x
3. 1
4. >>>
µ±È»Ä㻹¿ÉÒÔÏÔʽµÄɾ³ýËü£¬µ«ÔÚÕâÖ®ºóÄã¾Í²»ÄÜÔÙÒýÓÃÕ⸠......
http://hi.baidu.com/guzhilei1986/blog/item/8969b4debe99e150ccbf1ae7.html
º¯Êý ÃèÊö
int(x [,base ]) ......