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.

logging

Getter for logging.

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

set_logging(onoff)

Set logging of this object on or off

Parameters :

onoff : bool

set logging on (True) or off (False)

Notes

See also design.experiment.set_log_level fur further information about event logging.

Previous topic

expyriment.io.OutputFile

Next topic

expyriment.io.Screen

This Page