Exemple #1
def terminal_select(name):
    """ Returns the reader that corresponds to the given reader identifier.
    return None if reader does not exists."""
    # TODO: make sure this does not catch fire with corner cases.
    factory = TerminalFactory.getDefault()
    terminal = factory.terminals().getTerminal(name)
    return terminal
Exemple #2
def reader_list():
    """ Returns a list of all the available card readers."""
    # TODO: make sure exception is properly handled if there are no smartcard
    # reader connected.
    factory = TerminalFactory.getDefault()
    terminals = factory.terminals().list()
    return terminals