• Saul Ibarra's avatar
    Fix diverting std{out,err} when running frozen · d7ea6b9d
    Saul Ibarra authored
    
    When running frozen (ie, a Windows exe) we override sys.std{out,err} so the
    output can be diverted to a file.  There was a problem with logging.Logger
    instances which would get a reference to the original objecs and then find
    then closed after our second replacement.
    
    The solution is to override them very early, and this MUST be done BEFORE
    importing the log module.  Then, when the file property is set the StringIO
    will be drained into the file.
    d7ea6b9d
blink 1.95 KB