コード例 #1
0
 def update_interface(self):
     InstallProgress.update_interface(self)
     while Gtk.events_pending():
         Gtk.main_iteration()
     if (not self.term_expander.get_expanded() and
         (self.time_last_update + GDEBI_TERMINAL_TIMEOUT) < time.time()):
       self.term_expander.set_expanded(True)
     # sleep just long enough to not create a busy loop
     time.sleep(0.01)
コード例 #2
0
ファイル: GDebiGtk.py プロジェクト: hamonikr-root/gdebi
 def update_interface(self):
     InstallProgress.update_interface(self)
     while Gtk.events_pending():
         Gtk.main_iteration()
     if (not self.term_expander.get_expanded() and
         (self.time_last_update + GDEBI_TERMINAL_TIMEOUT) < time.time()):
       self.term_expander.set_expanded(True)
     # sleep just long enough to not create a busy loop
     time.sleep(0.01)
コード例 #3
0
    def update_interface(self):
        """Called periodically to update the interface.

        Emits: status-timeout() [When a timeout happens]
        """
        InstallProgress.update_interface(self)
        while self._context.pending():
            self._context.iteration()
        if self.time_last_update + self.INSTALL_TIMEOUT < time.time():
            self.emit("status-timeout")
コード例 #4
0
ファイル: KDEAptDialogs.py プロジェクト: frontjang/gdebi
 def update_interface(self):
     # run the base class
     try:
         InstallProgress.update_interface(self)
     except ValueError as e:
         pass
     # log the output of dpkg (on the master_fd) to the DumbTerminal
     while True:
         try:
             (rlist, wlist, xlist) = select.select([self.master_fd],[],[], 0.01)
             # data available, read it
             if len(rlist) > 0:
                 line = os.read(self.master_fd, 255)
                 self.parent.konsole.insertWithTermCodes(utf8(line))
             else:
                 # nothing happend within the timeout, break
                 break
         except Exception as e:
             logging.debug("update_interface: %s" % e)
             break
     KApplication.kApplication().processEvents()
コード例 #5
0
 def update_interface(self):
     # run the base class
     try:
         InstallProgress.update_interface(self)
     except ValueError as e:
         pass
     # log the output of dpkg (on the master_fd) to the DumbTerminal
     while True:
         try:
             (rlist, wlist, xlist) = select.select([self.master_fd], [], [],
                                                   0.01)
             # data available, read it
             if len(rlist) > 0:
                 line = os.read(self.master_fd, 255)
                 self.parent.konsole.insertWithTermCodes(utf8(line))
             else:
                 # nothing happend within the timeout, break
                 break
         except Exception as e:
             logging.debug("update_interface: %s" % e)
             break
     KApplication.kApplication().processEvents()