def _debug_log ( self , msg ) : if not self . debug : return sys . stderr . write ( '{}\n' . format ( msg ) )
python logging not print immediately
Debug log messages if debug = True
def _debug_log(self, msg):
        """Debug log messages if debug=True"""
        if not self.debug:
            return
        sys.stderr.write('{}\n'.format(msg))