Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Ï̱߳à³Ì£¨Èý£©Í¬²½¶ÓÁÐ

ÎÒÃǾ­³£»á²ÉÓÃÉú²úÕß/Ïû·ÑÕß¹ØÏµµÄÁ½¸öÏß³ÌÀ´´¦ÀíÒ»¸ö¹²Ïí»º³åÇøµÄÊý¾Ý¡£ÀýÈçÒ»¸öÉú²úÕßÏ߳̽ÓÊÜÓû§Êý¾Ý·ÅÈëÒ»¸ö¹²Ïí»º³åÇøÀµÈ´ýÒ»¸öÏû·ÑÕßÏ̶߳ÔÊý¾ÝÈ¡³ö´¦Àí¡£µ«ÊÇÈç¹û»º³åÇøµÄ̫С¶øÉú²úÕߺÍÏû·ÑÕßÁ½¸öÒì²½Ï̵߳ÄËٶȲ»Í¬Ê±£¬ÈÝÒ׳öÏÖÒ»¸öÏ̵߳ȴýÁíÒ»¸öÇé¿ö¡£ÎªÁ˾¡¿ÉÄܵÄËõ¶Ì¹²Ïí×ÊÔ´²¢ÒÔÏàͬËٶȹ¤×÷µÄ¸÷Ï̵߳ĵ ......

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()£¬·ñÔòÆäË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ