´®¿ÚͨѶµÄpythonÄ£¿é——pySerial
pySerial
Overview
This module encapsulates the access for the serial port. It provides backends for Python running on Windows, Linux, BSD (possibly any POSIX compliant system), Jython and IronPython (.NET and Mono). The module named "serial" automatically selects the appropriate backend.
It is released under a free software license, see LICENSE.txt for more details.
(C) 2001-2008 Chris Liechti cliechti@gmx.net
The project page on SourceForge and here is the SVN repository and the Download Page.
The homepage is on http://pyserial.sf.net/
Features
same class based interface on all supported platforms
access to the port settings through Python 2.2+ properties
port numbering starts at zero, no need to know the port name in the user program
port string (device name) can be specified if access through numbering is inappropriate
support for different bytesizes, stopbits, parity and flow control with RTS/CTS and/or Xon/Xoff
working with or without receive timeout
file like API with "read" and "write" ("readline" etc. also supported)
The files in this package are 100% pure Python. They depend on non standard but common packages on Windows (pywin32) and Jython (JavaComm). POSIX (Linux, BSD) uses only modules from the standard Python distribution)
The port is set up for binary transmission. No NULL byte stripping, CR-LF translation etc. (which are many times enabled for POSIX.) This makes this module universally useful.
Requirements
Python 2.2 or newer
pywin32 extensions on Windows
"Java Communications" (JavaComm) or compatible extension for Java/Jython
Installation
from source
Extract files from the archive, open a shell/console in that directory and let Distutils do the rest:
python setup.py install
The files get installed in the "Lib/site-packages" directory.
easy_install
An EGG is available from the Python Package Index: http://pypi.python.org/pypi/pyserial
easy_install pyserial
windows installer
There is also a Windows installer f
Ïà¹ØÎĵµ£º
mysqlÊÇÒ»¸öÓÅÐãµÄ¿ªÔ´Êý¾Ý¿â£¬ËüÏÖÔÚµÄÓ¦Ó÷dz£µÄ¹ã·º£¬Òò´ËºÜÓбØÒª¼òµ¥µÄ½éÉÜÒ»ÏÂÓÃpython²Ù×÷mysqlÊý¾Ý¿âµÄ·½·¨¡£python²Ù×÷Êý¾Ý¿âÐèÒª°²×°Ò»¸öµÚÈý·½µÄÄ£¿é£¬ÔÚhttp://mysql-python.sourceforge.net/
ÓÐÏÂÔغÍÎĵµ¡£
ÓÉÓÚpythonµÄÊý¾Ý¿âÄ£¿éÓÐרÃŵÄÊý¾Ý¿âÄ£¿éµÄ¹æ·¶£¬ËùÒÔ£¬Æäʵ²»¹ÜʹÓÃÄÄÖÖÊý¾ ......
Python 3 Êä³öÖض¨ÏòʹÓÃC/C++
By:gddsky
Ä¿±ê
Ï£Íû½«Python 3µÄÊä³öÖض¨Ïòµ½×Ô¶¨ÒåµÄÊä³öÄ¿±ê¡£
ºËÐÄ
PythonʹÓÃsys.stdout¡¢sys.stderr×öÊä³öÄ¿±ê£¬Ö»ÒªÎÒÃÇÌæ»»ÕâÁ½¸öÖµ¾Í¿ÉÒÔÖض¨Ïòµ½ÎÒÃÇ×Ô¶¨ÒåÄ¿±ê¡£Ìæ»»µÄÖµµÄ¹æÔòÔÚPythonµÄÎĵµÖÐsys (module)µÄsys.stdoutÉÏÃæ˵Ã÷Ö»ÒªÌí¼ÓÒ»¸öwriteº¯Êý¾Í¿ÉÒÔ ......
* PYTHON Ç÷ÏòÓÚ½«¹¦ÄÜÏà½üµÄ¶ÔÏó·Å½øÒ»¸öMODULE£¨Îļþ£©À²»Óõ£ÐĶÔÏó»áÌ«´ó£¬ÒòΪÈç¹û¶ÔÏóÌ«´óÁË£¬ÄÇËü¿ÉÄÜÊÇ×öµÄÊÂÐÔÌ«¶àÁË
ÐèÒª±»Öع¹¡¢·Ö½â¡£
* ¿ª·¢¸¨Öú¹¤¾ßÊÇPYTHONµÄÒ»¸öÇ¿Ïî¡£Èç¹¹½¨¹¤¾ß¡¢Í³¼Æ¹¤¾ßµÈµÈ£¬Ö»ÒªÓÐÐèÇó£¬ËüÒ»¶¨°ìµÃµ½£¬ÒòΪÕâЩӦÓö԰²È«ºÍÐÔÄÜÒªÇ󲻸ߣ¬·´
¶ø¶Ô¿ª· ......
ÔÎÄÁ´½Ó
Ôø¾ÔÚÉîÈëdz³öjavaÖÐÎÄÎÊÌâ
ϵ
ÁÐÖÐÑо¿¹ýjavaµÄÖÐÎÄÎÊÌ⣬ÏÖÔÚÖÐÎÄÎÊÌâÒѾ²»ÔÙî¿°íÎÒÔÚjavaÊÀ½çÖÐÂþÓεĽŲ½ÁË¡£×î½ü£¬¶ÔPython²úÉúÁËŨºñµÄÐËȤ£¬ËÖªµÀ¸úÖÐÎÄÎÊÌâÕâ¸ö
ÀÏÅóÓÑÓÖÒ»´Î²»ÆÚ¶øÓö¡£¿´À´£¬ÔÚ´úÂëÊÀ½çÖУ¬ÖÐÎÄÎÊÌâ»áÔںܳ¤Ò»¶Îʱ¼äÀï¸úÎÒÃÇÐÎÓ°²»Àë¡£ÕâÒ²Äѹ֣¬Ë ......