cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 1 | ========== |
| 2 | pySerial |
| 3 | ========== |
| 4 | |
| 5 | Overview |
| 6 | ======== |
| 7 | This module encapsulates the access for the serial port. It provides backends |
| 8 | for Python running on Windows, Linux, BSD (possibly any POSIX compliant |
| 9 | system), Jython and IronPython (.NET and Mono). The module named "serial" |
| 10 | automatically selects the appropriate backend. |
| 11 | |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 12 | It is released under a free software license, see LICENSE_ for more |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 13 | details. |
| 14 | |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 15 | Copyright (C) 2001-2009 Chris Liechti <cliechti(at)gmx.net> |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 16 | |
cliechti | 8e814dc | 2009-07-30 22:19:08 +0000 | [diff] [blame^] | 17 | Other pages (online) |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 18 | |
cliechti | 8e814dc | 2009-07-30 22:19:08 +0000 | [diff] [blame^] | 19 | - `project page on SourceForge`_ |
| 20 | - `SVN repository`_ |
| 21 | - `Download Page`_ with releases |
| 22 | - This page, when viewed online is at http://pyserial.sf.net. |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 23 | |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 24 | .. _LICENSE: appendix.html#license |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 25 | .. _`project page on SourceForge`: http://sourceforge.net/projects/pyserial/ |
| 26 | .. _`SVN repository`: http://sourceforge.net/svn/?group_id=46487 |
| 27 | .. _`Download Page`: http://sourceforge.net/project/showfiles.php?group_id=46487 |
| 28 | |
| 29 | |
| 30 | Features |
| 31 | ======== |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 32 | * Same class based interface on all supported platforms. |
cliechti | daf47ba | 2009-07-28 01:28:16 +0000 | [diff] [blame] | 33 | * Access to the port settings through Python properties. |
| 34 | * Support for different byte sizes, stop bits, parity and flow control with |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 35 | RTS/CTS and/or Xon/Xoff. |
| 36 | * Working with or without receive timeout. |
| 37 | * File like API with "read" and "write" ("readline" etc. also supported). |
cliechti | 6066f84 | 2009-07-24 00:05:45 +0000 | [diff] [blame] | 38 | * The files in this package are 100% pure Python. |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 39 | * The port is set up for binary transmission. No NULL byte stripping, CR-LF |
| 40 | translation etc. (which are many times enabled for POSIX.) This makes this |
| 41 | module universally useful. |
cliechti | daf47ba | 2009-07-28 01:28:16 +0000 | [diff] [blame] | 42 | * Compatible with :mod:`io` library (Python 2.6+) |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 43 | |
| 44 | |
| 45 | Requirements |
| 46 | ============ |
cliechti | daf47ba | 2009-07-28 01:28:16 +0000 | [diff] [blame] | 47 | * Python 2.3 or newer, including Python 3.x |
cliechti | 6066f84 | 2009-07-24 00:05:45 +0000 | [diff] [blame] | 48 | * ctypes extensions on Windows (is in standard library since Python 2.5+) |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 49 | * "Java Communications" (JavaComm) or compatible extension for Java/Jython |
| 50 | |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 51 | |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 52 | Installation |
| 53 | ============ |
| 54 | |
| 55 | pyserial |
| 56 | -------- |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 57 | This installs a package that can be used from Python (``import serial``). |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 58 | |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 59 | To install the module for all users on the system, administrator rights (root) |
| 60 | is required.. |
| 61 | |
| 62 | From source (tar.gz or checkout) |
| 63 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 64 | http://pypi.python.org/pypi/pyserial |
| 65 | Unpack the archive, enter the ``pyserial-x.y`` directory and run:: |
| 66 | |
| 67 | python setup.py install |
| 68 | |
| 69 | Setuptools/PyPI |
| 70 | ~~~~~~~~~~~~~~~ |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 71 | Alternatively it can be installed from PyPI, either manually downloading the |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 72 | files and installing as described above or using:: |
| 73 | |
| 74 | easy_install -U pyserial |
| 75 | |
| 76 | Packages |
| 77 | ~~~~~~~~ |
| 78 | There are also packaged versions for some Linux distributions and Windows: |
| 79 | |
| 80 | Debian/Ubuntu |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 81 | A package is available under the name "python-serial". |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 82 | |
| 83 | Windows |
| 84 | There is also a Windows installer for end users. It is located in the |
| 85 | PyPi_. Developers may be interested to get the source archive, because it |
| 86 | contains examples and the readme. |
| 87 | |
| 88 | .. _PyPi: http://pypi.python.org/pypi/pyserial |
| 89 | |
| 90 | |
| 91 | References |
| 92 | ========== |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 93 | * Python: http://www.python.org/ |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame] | 94 | * Jython: http://www.jython.org/ |
cliechti | 5134aab | 2009-07-21 19:47:59 +0000 | [diff] [blame] | 95 | * Java@IBM: http://www-106.ibm.com/developerworks/java/jdk/ (JavaComm links are |
| 96 | on the download page for the respective platform JDK) |
| 97 | * Java@SUN: http://java.sun.com/products/ |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 98 | * IronPython: http://www.codeplex.com/IronPython |
| 99 | * setuptools: http://peak.telecommunity.com/DevCenter/setuptools |
| 100 | |
| 101 | |
| 102 | Older Versions |
| 103 | ============== |
| 104 | Older versions are still available on the `Download Page`_. pySerial 1.21 is |
| 105 | compatible with Python 2.0 on Windows, Linux and several un*x like systems, |
| 106 | MacOSX and Jython. |
| 107 | |
cliechti | daf47ba | 2009-07-28 01:28:16 +0000 | [diff] [blame] | 108 | On windows releases older than 2.5 will depend on pywin32_ (previously known as |
| 109 | win32all) |
cliechti | 6066f84 | 2009-07-24 00:05:45 +0000 | [diff] [blame] | 110 | |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 111 | .. _`Download Page`: http://sourceforge.net/project/showfiles.php?group_id=46487 |
cliechti | 6066f84 | 2009-07-24 00:05:45 +0000 | [diff] [blame] | 112 | .. _pywin32: http://pypi.python.org/pypi/pywin32 |