Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
IrDA socket interface for Python
C Shell Python
branch: master
Failed to load latest commit information.
pkg/arch
src
LICENSE
MANIFEST.in
PKG-INFO Updating documents for 1.2 release
README Updating documents for 1.2 release
setup.py

README

python-irda : IrDA Socket Interface for Python
----------------------------------------------

Author: Jonathan Krauss
E-Mail: jkrauss@asymworks.com

This module implements a lightweight IrDA socket interface for Python. It is modeled after and uses a similar interface to the default Python 'socket' module.  The code has been tested on Linux and Windows 7 64bit.

The code is released under a BSD license.

Basic Usage
-----------

import irda

# Enumerate IrDA Devices
devs = irda.discover()

# Create a new IrDA Socket
sck = irda.irsocket()

# Connect to the first device
sck.set_timeout(2000)
sck.connect(devs[0]['addr'])

# Read and write using send(data) and recv(num_bytes)
sck.send('\x14')
sdat = sck.recv(4)
data = unpack('<L', sdat)[0]

# Close socket when done
sck.close()

Building/Installation
---------------------

Run the following commands (or equivalents) to build and install irsocket:

$ python setup.py build
$ sudo python setup.py install

Bugs/Additions
--------------

Please feel free to send pull requests or patches to <jkrauss@asymworks.com>
Something went wrong with that request. Please try again.