Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÊÇÒ»Ãżòµ¥µÄÓïÑÔ¡£¶ÔÓÚÒ»¸öÎÊÌ⣬Ӧ¸ÃÖ»ÓÐÒ»¸ö½â¾ö·½·¨¡£ÔÚPythonÖУ¬ÓÐÈýÖÖÁ÷³Ì¿ØÖÆ·½·¨£ºif-else¡¢whileºÍfor¡£
        Ê×ÏÈ£¬½éÉÜif-elseÌõ¼þÓï¾ä¡£ifÓï¾äÊÇÓÃÀ´¸ù¾Ý±í´ïʽµÄÕæ¼ÙÀ´ÓÐÑ¡ÔñµÄÖ´ÐÐÌØ¶¨µÄ³ÌÐò¿é£¬¿ØÖƳÌÐòµÄÁ ......

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ÀàÐÍת»»£¬ÊýÖµ²Ù×÷(ת)


http://hi.baidu.com/guzhilei1986/blog/item/8969b4debe99e150ccbf1ae7.html
º¯Êý                       ÃèÊö  
int(x [,base ])          ......

python pyserial ´®¿Ú

ÓÃpythonдÁ˸ö×î¼òµ¥µÄ¶Á´®¿ÚµÄ³ÌÐò£¬ÒòΪ¹¤×÷Öо­³£ÐèÒª¶Á´®¿Ú
·Åԭʼ´úÂë
import serial
ser = serial.Serial('com3',baudrate=115200, bytesize=8,parity='N', stopbits=1,xonxoff=0, timeout=1)
while( True ):
    a = ser.read(100)
    print a
ÓÃÍêÐèÒªser.close()£¬·ñÔòÆäË ......

python ¶à¼Ì³Ð(2)

from:  http://www.chinesepython.org/pythonfoundry/tut2.3/tmp/multiple.html
9.5.1 ¶à¼Ì³Ð Multiple Inheritance
Python supports a limited form of multiple inheritance as well. A class definition with multiple base classes looks as follows:
PythonͬÑùÓÐÏÞµÄÖ§³Ö¶à¼Ì³ÐÐÎʽ¡£¶à¼Ì³ÐµÄÀඨÒåÐÎÈçÏÂÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ