def main():
    """
    Wrapper main function that handles broken pipes and keyboard interrupts.
    """
    # Lifted from pep8.py located here:
    # https://github.com/jcrocholl/pep8/blob/1.6.2/pep8.py#L2095-L2099
    # Many thanks!
    # Handle "Broken pipe" gracefully
    try:
        signal.signal(signal.SIGPIPE, lambda signum, frame: sys.exit(1))
    except __HOLE__:
        pass    # not supported on Windows

    try:
        _main()
    except KeyboardInterrupt:
        exit(1)
dataset/ETHPy150Open igorgue/pjson/pjson/__init__.py/main