Senthil Kumaran avatar Senthil Kumaran committed 5bbddf6

py3k web_display

Comments (0)

Files changed (1)

urwid/raw_display.py

         assert self._started
 
         self._wait_for_input_ready(self._next_timeout)
-        self._next_timeout, keys, raw = self._input_iter.next()
+        self._next_timeout, keys, raw = next(self._input_iter)
 
         # Avoid pegging CPU at 100% when slowly resizing
         if keys==['window resize'] and self.prev_input_resize:
             while True:
                 self._wait_for_input_ready(self.resize_wait)
                 self._next_timeout, keys, raw2 = \
-                    self._input_iter.next()
+                    next(self._input_iter)
                 raw += raw2
                 #if not keys:
                 #    keys, raw2 = self._get_input(
         """
         assert self._started
 
-        return self._input_iter.next()
+        return next(self._input_iter)
 
     def _run_input_iter(self):
         def empty_resize_pipe():
         try:
             while self.gpm_mev is not None and self.gpm_event_pending:
                 codes.extend(self._encode_gpm_event())
-        except IOError, e:
+        except IOError as e:
             if e.args[0] != 11:
                 raise
         return codes
                     ready,w,err = select.select(
                         fd_list,[],fd_list, timeout)
                 break
-            except select.error, e:
+            except select.error as e:
                 if e.args[0] != 4:
                     raise
                 if self._resized:
         self._setup_G1_done = True
 
 
-    def draw_screen(self, (maxcol, maxrow), r ):
+    def draw_screen(self, xxx_todo_changeme, r ):
         """Paint screen with rendered canvas."""
+        (maxcol, maxrow) = xxx_todo_changeme
         assert self._started
 
         assert maxrow == r.rows()
                     self._term_output_file.flush()
                     k = 0
             self._term_output_file.flush()
-        except IOError, e:
+        except IOError as e:
             # ignore interrupted syscall
             if e.args[0] != 4:
                 raise
 
         self.clear()
         self._pal_escape = {}
-        for p,v in self._palette.items():
+        for p,v in list(self._palette.items()):
             self._on_update_palette_entry(p, *v)
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.