import termios


def flags(names):
    """
    Return the result of ORing a set of (space separated) :py:mod:`termios`
    module constants together.
    """
    return sum(getattr(termios, name, 0)
               for name in names.split())