(self)
Remove the console window.
        A minimised window can't be hidden to tray, so restore it first.
Remove the console window.
        A minimised window can't be hidden to tray, so restore it first.
Remove the console window . A minimised window can t be hidden to tray so restore it first .
def minimise_to_tray(self):
        """Remove the console window.
        A minimised window can't be hidden to tray, so restore it first.
        """
        if self.console_hwnd is None:
            return

        if self.console_hwnd.minimised:
            self.console_hwnd.restore()
            
        self.console_hwnd.hide()
        for func in self._commands['OnWindowHide']:
            func(self)
        
        if self.__dict__.get('minimise_override', None):
            del self.minimise_override
            self.bring_to_front()

        self.logger.info('Window hidden.')
def minimise_to_tray ( self ) : if self . console_hwnd is None : return if self . console_hwnd . minimised : self . console_hwnd . restore ( ) self . console_hwnd . hide ( ) for func in self . _commands [ 'OnWindowHide' ] : func ( self ) if self . __dict__ . get ( 'minimise_override' , None ) : del self . minimise_override self . bring_to_front ( ) self . logger . info ( 'Window hidden.' )