summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2009-07-24 00:05:45 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2009-07-24 00:05:45 +0000
commit6066f8429c63c4b95d0f24f3e142a767ed0a7ddd (patch)
treeb9ade10ca08b59f4517d804af69948cc62b3a738
parent53c9fd48bed88cd4b3a6b686ac7e43d6077bbd96 (diff)
downloadpyserial-git-6066f8429c63c4b95d0f24f3e142a767ed0a7ddd.tar.gz
- implementation for win uses ctypes now
- API docs: exceptions raised - remove copy&paste text
-rw-r--r--documentation/pyserial.rst10
-rw-r--r--documentation/pyserial_api.rst48
2 files changed, 32 insertions, 26 deletions
diff --git a/documentation/pyserial.rst b/documentation/pyserial.rst
index c7c7b3d..c522ed2 100644
--- a/documentation/pyserial.rst
+++ b/documentation/pyserial.rst
@@ -37,9 +37,7 @@ Features
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 files in this package are 100% pure Python.
* 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.
@@ -48,7 +46,7 @@ Features
Requirements
============
* Python 2.2 or newer
-* pywin32 extensions on Windows
+* ctypes extensions on Windows (is in standard library since Python 2.5+)
* "Java Communications" (JavaComm) or compatible extension for Java/Jython
@@ -96,7 +94,6 @@ Windows
References
==========
* Python: http://www.python.org/
-* pywin32: http://sourceforge.net/projects/pywin32/ (previously known as win32all)
* Jython: http://www.jython.org/
* Java@IBM: http://www-106.ibm.com/developerworks/java/jdk/ (JavaComm links are
on the download page for the respective platform JDK)
@@ -111,4 +108,7 @@ Older versions are still available on the `Download Page`_. pySerial 1.21 is
compatible with Python 2.0 on Windows, Linux and several un*x like systems,
MacOSX and Jython.
+On windows they will depend on pywin32_ (previously known as win32all)
+
.. _`Download Page`: http://sourceforge.net/project/showfiles.php?group_id=46487
+.. _pywin32: http://pypi.python.org/pypi/pywin32
diff --git a/documentation/pyserial_api.rst b/documentation/pyserial_api.rst
index 9df35c6..f5d5791 100644
--- a/documentation/pyserial_api.rst
+++ b/documentation/pyserial_api.rst
@@ -38,6 +38,13 @@ Classes
:param interCharTimeout:
Inter-character timeout, None to disable.
+ :exception ValueError:
+ Will be raised when parameter are out of range, e.g. baudrate, data bits.
+
+ :exception SerialException:
+ In case the device can not be found or can not be configured.
+
+
The port is immediately opened on object creation, when a ``port`` is
given. It is not opened when port is None.
@@ -81,6 +88,10 @@ Classes
:param data: Data to send.
+ :exception SerialTimeoutException:
+ In case a write timeout is configured for the port and the time is
+ exceeded.
+
Write the string ``data`` to the port.
.. method:: flush():
@@ -241,7 +252,7 @@ Classes
This class is used to provide the above functions for to Serial
port objects.
- Note that when the serial port was opened with _NO_ timeout that
+ Note that when the serial port was opened with no timeout that
readline blocks until it sees a newline (or the specified size is
reached) and that readlines would never return and therefore
refuses to work (it raises an exception in this case)!
@@ -270,6 +281,9 @@ Classes
Write a list of strings to the port.
+
+ The following three methods are overridden in :class:`Serial`.
+
.. method:: flush()
Flush of file like objects. It's a no-op in this class, may be overridden.
@@ -307,53 +321,43 @@ Classes
.. attribute:: baudrate
- Read or write current baud rate setting. It is possible to change this
- on an opened port.
+ Read or write current baud rate setting.
.. attribute:: bytesize
- Read or write current data byte size setting. It is possible to change
- this on an opened port.
+ Read or write current data byte size setting.
.. attribute:: parity
- Read or write current parity setting. It is possible to change this on
- an opened port.
+ Read or write current parity setting.
.. attribute:: stopbits
- Read or write current stop bit width setting. It is possible to change
- this on an opened port.
+ Read or write current stop bit width setting.
.. attribute:: timeout
- Read or write current read timeout setting. It is possible to change
- this on an opened port.
+ Read or write current read timeout setting.
.. attribute:: writeTimeout
- Read or write current write timeout setting. It is possible to change
- this on an opened port.
+ Read or write current write timeout setting.
.. attribute:: xonxoff
- Read or write current software flow control rate setting. It is
- possible to change this on an opened port.
+ Read or write current software flow control rate setting.
.. attribute:: rtscts
- Read or write current hardware flow control setting. It is possible to
- change this on an opened port.
+ Read or write current hardware flow control setting.
.. attribute:: dsrdtr
- Read or write current hardware flow control setting. It is possible to
- change this on an opened port.
+ Read or write current hardware flow control setting.
.. attribute:: interCharTimeout
- Read or write current inter character timeout setting. It is possible
- to change this on an opened port.
+ Read or write current inter character timeout setting.
The following constants are also provided:
@@ -414,5 +418,7 @@ Bytesize
Others
-------
+Default control characters for software flow control.
+
.. data:: XON
.. data:: XOFF