def flushStdout(): try: GM.Globals[GM.STDOUT].get(GM.REDIRECT_MULTI_FD, sys.stdout).flush() except IOError as e: systemErrorExit(FILE_ERROR_RC, e)