Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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()


Ïà¹ØÎĵµ£º

Python3ÔÚubuntu»·¾³Ïµİ²×°

       Ê×ÏÈÏÂÔØ×îа汾µÄPython£¬ÔÚÕâÀïÎҵİ汾ÊÇPython3.1.1¡£È»ºó¾ÍÊǰ²×°£¬Çл»µ½PythonµÄÎļþĿ¼Ï£º
./configure
make
make test
sudo make install
      ÔÚÕâÀï¿ÉÄÜ»áÓöµ½¼¸¸öÎÊÌ⣬µÚÒ»¸öÊÇÔÚ./configureʱ£¬¿ÉÄÜ»á³öÏÖC compiler cannot create ......

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

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

PythonÖеĴúÂëÖØÓ×—Modules

      ÔÚPythonÖУ¬¿ÉÒÔʹÓÃFunctionÀ´ÊµÏÖ´úÂëÖØÓá£Èç¹ûÐèÒªÖØÓÃÒ»×éfunction£¬ÔòÐèҪʹÓÃModules¡£
      ¶ÔÓÚModules£¬¿ÉÒÔʹÓÃÁ½ÖÖ·½·¨±àд¡£µÚÒ»¡¢Ò²ÊÇ×î¼òµ¥µÄ·½·¨£¬¾ÍÊÇʹÓÃPython±àд¡£¿ÉÒÔ´´½¨Ò»¸öºó׺ÃûΪ.pyµÄÎļþ£¬ÔÚÆäÖбàдº¯ÊýºÍ±äÁ¿¡£ÁíÍâÒ»ÖÖ·½·¨ÊÇÖ ......

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ºÅ