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