摘要: 1. Python 串口设备应用简述 1.1. 线程轮寻风尘无限 <tianyu263@163.com>-- 分享 就是打开串口后,启动一个线程来监听串口数据的进入,有数据时,就做数据的处理(也可以发送一个事件,并携带接收到的数据)。 切换行号显示 #coding=gb18030import sys,threading,time;import serial;import binascii,encodings;import re;import socket;class ReadThread: def __init__(self, Output=None, Port=0, Log=No 阅读全文
posted @ 2010-09-15 09:38 dainiao01 阅读(977) 评论(1) 推荐(0) 编辑
摘要: pySerialOverviewThis 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 i 阅读全文
posted @ 2010-09-15 09:15 dainiao01 阅读(4231) 评论(1) 推荐(0) 编辑
摘要: Python中的easy_install工具很爽,它的作用类似于Php中的pear,或者Ruby中的gem,或者Perl中的cpan。如果想使用easy_install工具,可能需要先安装setuptools,不过更酷的方法是使用ez_setup.py脚本:wget -q http://peak.telecommunity.com/dist/ez_setup.pypython ez_setup.py安装完后,最好确保easy_install所在目录已经被加到PATH环境变量里:Windows: C:/Python25/ScriptsLinux: /usr/local/bin比如说要安装Pyth 阅读全文
posted @ 2010-09-15 09:09 dainiao01 阅读(188) 评论(0) 推荐(0) 编辑