易截截图软件、单文件、免安装、纯绿色、仅160KB

串口通讯的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


相关文档:

python应用领域介绍

 
Python作为一种功能强大且通用的编程语言而广受好评,它具有非常清晰的语法特点,适用于多种操作系统,目前在国际上非常流行,正在得到越来越多的应用。 
下面就让我们一起来看看它的强大功能: 
Python(派森),它是一个简单的、解释型的、交互式的、可移植的、面向对象的超高级语言。这就是对Python ......

如何发布vc调用Python的独立运行的程序

编译Python脚本生成可执行程序,可以通过py2exe编译完成。
在VC中调用python时,可以结合py2exe,完成整个程序的独立发布^_^
google.py:
#! /usr/bin/env python
import sys, webbrowser
def main(a):
    url = "http://www.google.com/search?q=%s" % a
    webbrowser.o ......

python猜数字游戏

from random import randint              #导入随即函数
def guessNum():                          &nbs ......

使用py2exe打包python脚本(except 2.6)

一、简介
py2exe是一个将python脚本转换成windows上的可独立执行的可执行程序(*.exe)的工具,这样,你就可以不用装python而在windows系统上运行这个可执行程序。
py2exe已经被用于创建wxPython,Tkinter,Pmw,PyGTK,pygame,win32com client和server,和其它的独立程序。py2exe是发布在开源许可证下的。
二、安装py2exe ......

vim 的python 语法高亮

vim支持大部分文件格式的语法高亮,而且可以自定义。不过缺省的python语法高亮感觉太少,修改一下。
1.修改语法高亮文件
vim/vim72/syntax/python.vim
将"    let python_highlight_all = 1
前面的引号去掉,可支持内置函数,数字,空格,异常的语法高亮。
2. 将self加进
syn keyword pythonBuiltin&n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号