def get_stopbits():
    """
    Returns supported stop bit lengths in a Django-like choices tuples.
    """
    stopbits = []
    s = pyserial.Serial()
    for name, value in s.getSupportedStopbits():
        stopbits.append((value, name,))
    return tuple(stopbits)
Returns supported stop bit lengths in a Django-like choices tuples.