blob: a50b6550fe9d53165f102c36473156e96e52ebac [file] [log] [blame]
cliechti86e87872009-07-21 13:32:45 +00001==========
2 Examples
3==========
4
5Miniterm
6========
7This is a console application that provides a small terminal application.
8miniterm itself does not implement any terminal features such as VT102
9compatibility. However it inherits these features from the terminal it is run.
10For example on GNU/Linux running from an xterm it will support the escape
11sequences of the xterm. On Windows the typical console window is dumb and does
12not support any escapes. When ANSI.sys is loaded it supports some escapes.
13
14Command line options can be given so that binary data including escapes for
15terminals are escaped or output as hex.
16
17miniterm supports some control functions. Typing ``CTRL+T CTRL+H`` when it is
18running shows the help text.
19
20miniterm.py_
21 The miniterm program.
22
23setup-miniterm-py2exe.py_
24 This is a py2exe setup script for Windows. It can be used to create a
25 standalone ``miniterm.exe``.
26
27.. _miniterm.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/miniterm.py
28.. _setup-miniterm-py2exe.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/setup-miniterm-py2exe.py
29
30
31TCP/IP - serial bridge
32======================
33This program opens a TCP/IP port. When a connection is made to that port (e.g.
34with telnet) it forwards all data to the serial port and vice versa.
35
36The serial port settings are set on the command line when starting the program.
37There is no possibility to change settings from remote.
38
39tcp_serial_redirect.py_
40 Main program.
41
42.. _tcp_serial_redirect.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/tcp_serial_redirect.py
43
44
45wxPython examples
46=================
47A simple terminal application for wxPython and a flexible serial port
48configuration dialog are shown here.
49
50wxTerminal.py_
51 A simple terminal application. Note that the length of the buffer is
52 limited by wx and it may suddenly stop displaying new input.
53
54wxTerminal.wxg_
55 A wxGlade design file for the terminal application.
56
57wxSerialConfigDialog.py_
58 A flexible serial port configuration dialog.
59
60wxSerialConfigDialog.wxg_
61 The wxGlade design file for the configuration dialog.
62
63setup_demo.py_
64 A py2exe setup script to package the terminal application.
65
66.. _wxTerminal.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/wxTerminal.py
67.. _wxTerminal.wxg: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/wxTerminal.wxg
68.. _wxSerialConfigDialog.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/wxSerialConfigDialog.py
69.. _wxSerialConfigDialog.wxg: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/wxSerialConfigDialog.wxg
70.. _setup_demo.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/setup_demo.py
71
72
73Wrapper class
74=============
75This example provides a subclass based on ``Serial`` that has an alternative
76implementation of ``readline()``
77
78enhancedserial.py_
79 A class with alternative ``readline()`` implementation.
80
81.. _enhancedserial.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/enhancedserial.py
82
83
84Finding serial ports
85====================
86scan.py_
87 A simple loop that probes serial ports by number.
88
89scanwin32.py_
90 A Windows only version that returns a list of serial ports with information
91 from the registry.
92
93.. _scan.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/scan.py
94.. _scanwin32.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/scanwin32.py
95
96
97Unit tests
98==========
99The project uses a number of unit test to verify the functionality. They all
100need a loop back connector. The scripts itself contain more information.
101
102test.py_
103 Basic tests.
104
105test_high_load.py_
106 Tests involving sending a lot of data.
107
108test_advanced.py_
109 Test more advanced features.
110
111.. _test.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/test.py
112.. _test_high_load.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/test_high_load.py
113.. _test_advanced.py: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/examples/test_advanced.py