纯wxpython中一种简单的跨平台串行终端

wxTerminal的Python项目详细描述


许可证: bsd,请参见readme.txt

更改: | 1.1原始版本 | 1.2增加“后门”插座服务器 | 1.3 TX和RX上的分离新线转换 | 1.4增加了对csfifo的依赖性

用法:

我在windows xp、windows 7和linux/ubuntu上用python 2.6.7和2.7.3测试过它,但是没有给出它正确运行的保证。它可能适用于较旧的python版本和其他操作系统。

它现在支持一个socket服务器,因此您可以通过tcp远程连接到它。

port参数现在支持来自pyserial的url,例如

port=socket://localhost:12345

从命令行:

usage: wxTerminal.py [-h] [-port PORT] [-baud BAUD] [-xon] [-rts]
                    [-timeout TIMEOUT] [-echo] [-D]
                    [-KBNONE | -KBCR | -KBLF | -KBCRLF | -KBLFCR]
                    [-SPNONE | -SPCR | -SPLF | -SPCRLF | -SPLFCR]
                    [-5 | -6 | -7 | -8]
                    [-stop {1,1.5,2}] [-None | -Odd | -Even | -Mark | -Space]
                    [-snoopserver] [-lockKB]
e.g.
wxTerminal.py -h
wxTerminal.py <PORT> [other settings]
Simply wxTerminal.py on it's own pops up a configuration dialog

来自python:

import wxTerminal
wxTerminal.Terminal(port="/dev/ttyS0")  #Will open /dev/ttyS0 with default settings

import wxTerminal
t=wxTerminal.Termina(port="/dev/tyUSB0",baudrate=115200,snoopserver=True)

import wxTerminal
wxTerminal.Terminal() #Will bring up a port setup dialog

其他关键字参数:

baudrate      Sets the serial baud rate
bytesize      Sets size of Tx/Rx serial characters
parity        Sets serial parity
stopbits      Sets number of stop bits
rtscts        Enables hardware flow control
xonxoff       Enables software flow control
timeout       Alters serial timeout
echo          Enables local echo
unprintable   TBD
sp_newline    Inbound newline translation
kb_newline    Outbound newline translation
snoopserver   Enable a telnet server (port 56712)
PortSettings  A dictionary with keys/values from the above list
lockKB        Lock keyboard input (useful for snooped connections)

依赖关系:

wxPython
pySerial
Python >2.6.3
csFIFO

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Android将字符串拆分为数组   java如何读取底层HttpServerExchange对象中的响应数据?   在jenkins上安装gitplugin时出现java错误   java DecimalFormat格式decimal,用于保留可变数量的尾随零   java Jaxws、spring和SpringBeanAutowiringSupport   Gson中抽象类的java反序列化   监视Windows服务器中的UDP数据包丢失,Java   java从侦听器调用所有者类   java Scala和Robocode类循环错误   java映像未上载到数据库   java如何将XML文件直接写入zip存档?   java为什么需要EventSourcingHandler(在聚合对象中)?   接受特定对象或其子类型的java通用方法   java Spring安全过滤器映射在特定Url模式上禁用