human
Complete this python program:
def addOpenEventSupport(root, flist):
assistant
#Here is the Python program you requested.

    """This ensures that the application will respond to open AppleEvents, which
    makes is feasible to use IDLE as the default application for python files.
    """
    def doOpenFile(*args):
        for fn in args:
            flist.open(fn)
    root.createcommand('::tk::mac::OpenDocument', doOpenFile)