expyriment.io.ParallelPort

class expyriment.io.ParallelPort

A class implementing a parallel port input and output.

Notes

CAUTION: Under Windows (starting from 2000) direct I/O is blocked. Install http://sourceforge.net/projects/pyserial/files/pyparallel/giveio/

Methods

__init__()

Create a parallel port input and output.

clear()

Clear the parallell port.

Dummy method required for port interfaces (see e.g. ButtonBox)

static get_available_ports()

Return an array of strings representing the available serial ports.

If pyparallel is not installed, ‘None’ will be returned.

Returns :

ports : list

array of strings representing the available serial ports

has_input_history

Returns always False, because ParallelPort has no input history.

parallel

Getter for parallel

poll()

Poll the parallel port.

The parlallel port will be polled. The result will be put into the buffer and returned. The parallel module for Python can only read three of the status lines. The result is thus coded in three bits:

Acknowledge Paper-Out Selected

Example: ‘4’ means only Selected is receiving data (“001”).

To send out data the actual data lines are used.

send(data)

Send data.

Parameters :

data : int

data to be sent

Previous topic

expyriment.io.OutputFile

Next topic

expyriment.io.Screen

This Page