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 | |
| 12 | It is released under a free software license, see LICENSE.txt_ for more |
| 13 | details. |
| 14 | |
| 15 | (C) 2001-2009 Chris Liechti <cliechti@gmx.net> |
| 16 | |
| 17 | The `project page on SourceForge`_ and here is the `SVN repository`_ and the `Download Page`_. |
| 18 | |
| 19 | The homepage is at http://pyserial.sf.net. |
| 20 | |
| 21 | .. _LICENSE.txt: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/LICENSE.txt |
| 22 | .. _`project page on SourceForge`: http://sourceforge.net/projects/pyserial/ |
| 23 | .. _`SVN repository`: http://sourceforge.net/svn/?group_id=46487 |
| 24 | .. _`Download Page`: http://sourceforge.net/project/showfiles.php?group_id=46487 |
| 25 | |
| 26 | |
| 27 | Features |
| 28 | ======== |
| 29 | * same class based interface on all supported platforms |
| 30 | * access to the port settings through Python 2.2+ properties |
| 31 | * port numbering starts at zero, no need to know the port name in the user |
| 32 | program |
| 33 | * port string (device name) can be specified if access through numbering is |
| 34 | inappropriate |
| 35 | * support for different bytesizes, stopbits, parity and flow control with |
| 36 | RTS/CTS and/or Xon/Xoff |
| 37 | * working with or without receive timeout |
| 38 | * file like API with "read" and "write" ("readline" etc. also supported) |
| 39 | * The files in this package are 100% pure Python. They depend on non standard |
| 40 | but common packages on Windows (pywin32) and Jython (JavaComm). POSIX (Linux, |
| 41 | BSD) uses only modules from the standard Python distribution) |
| 42 | * The port is set up for binary transmission. No NULL byte stripping, CR-LF |
| 43 | translation etc. (which are many times enabled for POSIX.) This makes this |
| 44 | module universally useful. |
| 45 | |
| 46 | |
| 47 | Requirements |
| 48 | ============ |
| 49 | * Python 2.2 or newer |
| 50 | * pywin32 extensions on Windows |
| 51 | * "Java Communications" (JavaComm) or compatible extension for Java/Jython |
| 52 | |
| 53 | Installation |
| 54 | ============ |
| 55 | |
| 56 | pyserial |
| 57 | -------- |
| 58 | This installs a package that can be used from python (``import serial``). |
| 59 | |
| 60 | The Python pywin32 library needs to be installed on windows. |
| 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 | ~~~~~~~~~~~~~~~ |
| 74 | Alternatively it can be installed from PyPy, either manually downloading the |
| 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 |
| 84 | A package is availabe under the name "python-serial" |
| 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 | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 97 | * pywin32: http://sourceforge.net/projects/pywin32/ (previously known as win32all) |
cliechti | 86e8787 | 2009-07-21 13:32:45 +0000 | [diff] [blame^] | 98 | * Jython: http://www.jython.org/ |
| 99 | * Java@IBM http://www-106.ibm.com/developerworks/java/jdk/ (JavaComm links are |
| 100 | on the download page for the respective platform jdk) |
cliechti | 2297814 | 2009-07-21 01:58:11 +0000 | [diff] [blame] | 101 | * Java@SUN http://java.sun.com/products/ |
| 102 | * IronPython: http://www.codeplex.com/IronPython |
| 103 | * setuptools: http://peak.telecommunity.com/DevCenter/setuptools |
| 104 | |
| 105 | |
| 106 | Older Versions |
| 107 | ============== |
| 108 | Older versions are still available on the `Download Page`_. pySerial 1.21 is |
| 109 | compatible with Python 2.0 on Windows, Linux and several un*x like systems, |
| 110 | MacOSX and Jython. |
| 111 | |
| 112 | .. _`Download Page`: http://sourceforge.net/project/showfiles.php?group_id=46487 |