[pyrepl-checkins] pyrepl/pyrepl cmdrepl.py,1.3,1.4 historical_reader.py,1.8,1.9 python_reader.py,1.14,1.15 reader.py,1.12,1.13 unix_console.py,1.10,1.11 unix_eventqueue.py,1.2,1.3

mwh@codespeak.net mwh@codespeak.net
Tue, 11 May 2004 19:56:03 +0200 (MEST)


Update of /cvs/pyrepl/pyrepl/pyrepl
In directory thoth.codespeak.net:/tmp/cvs-serv14208/pyrepl

Modified Files:
	cmdrepl.py historical_reader.py python_reader.py reader.py 
	unix_console.py unix_eventqueue.py 
Log Message:
A few pychecker suggestions.


Index: cmdrepl.py
===================================================================
RCS file: /cvs/pyrepl/pyrepl/pyrepl/cmdrepl.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** cmdrepl.py	11 May 2004 17:20:34 -0000	1.3
--- cmdrepl.py	11 May 2004 17:56:01 -0000	1.4
***************
*** 50,56 ****
          self.completions = completions
  
-     def install_keymap(self):
-         self.console.install_keymap(keymap)
- 
      def get_completions(self, stem):
          if len(stem) != self.pos:
--- 50,53 ----

Index: historical_reader.py
===================================================================
RCS file: /cvs/pyrepl/pyrepl/pyrepl/historical_reader.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** historical_reader.py	11 May 2004 17:20:34 -0000	1.8
--- historical_reader.py	11 May 2004 17:56:01 -0000	1.9
***************
*** 34,37 ****
--- 34,39 ----
       (r'\<backspace>', 'isearch-backspace')])
  
+ del c
+ 
  ISEARCH_DIRECTION_NONE = ''
  ISEARCH_DIRECTION_BACKWARDS = 'r'

Index: python_reader.py
===================================================================
RCS file: /cvs/pyrepl/pyrepl/pyrepl/python_reader.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** python_reader.py	11 May 2004 17:20:35 -0000	1.14
--- python_reader.py	11 May 2004 17:56:01 -0000	1.15
***************
*** 24,28 ****
  from pyrepl import copy_code, commands, completer
  from pyrepl import module_lister
! import new, codeop, sys, os, re, code, traceback
  import atexit, warnings
  try:
--- 24,28 ----
  from pyrepl import copy_code, commands, completer
  from pyrepl import module_lister
! import new, sys, os, re, code, traceback
  import atexit, warnings
  try:
***************
*** 152,157 ****
              execfile(initfile, self.locals, self.locals)
          except:
!             traceback.print_exception(sys.exc_type, sys.exc_value,
!                                       sys.exc_traceback.tb_next)
  
      def execute(self, text):
--- 152,157 ----
              execfile(initfile, self.locals, self.locals)
          except:
!             etype, value, tb = sys.exc_info()
!             traceback.print_exception(etype, value, tb.tb_next)
  
      def execute(self, text):

Index: reader.py
===================================================================
RCS file: /cvs/pyrepl/pyrepl/pyrepl/reader.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** reader.py	11 May 2004 17:20:35 -0000	1.12
--- reader.py	11 May 2004 17:56:01 -0000	1.13
***************
*** 526,530 ****
              self.do_cmd(cmd)
              return 1
! 
      def readline(self):
          """Read a line.  The implementation of this method also shows
--- 526,530 ----
              self.do_cmd(cmd)
              return 1
!     
      def readline(self):
          """Read a line.  The implementation of this method also shows

Index: unix_console.py
===================================================================
RCS file: /cvs/pyrepl/pyrepl/pyrepl/unix_console.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** unix_console.py	11 May 2004 17:20:35 -0000	1.10
--- unix_console.py	11 May 2004 17:56:01 -0000	1.11
***************
*** 18,22 ****
  # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  
! import termios, curses, select, os, struct, types, errno
  import signal, re, time, sys
  from fcntl import ioctl
--- 18,22 ----
  # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  
! import termios, curses, select, os, struct, errno
  import signal, re, time, sys
  from fcntl import ioctl
***************
*** 38,58 ****
      return r
  
- _keysets = {}
- 
- def keyset(con=None):
-     if con is None:
-         term, fd = os.environ["TERM"], 0
-     else:
-         term, fd = con.term, con.input_fd
-     try:
-         return _keysets[(term, fd)]
-     except KeyError:
-         set = {'space' : ' ', 'tab' : '\t', 'hash' : '#',
-                "escape":"\033", "return":"\n", 'backslash':'\\'}
-         for key, code in _keynames.items():
-             set[key] = curses.tigetstr(code)
-         set["backspace"] = termios.tcgetattr(fd)[6][termios.VERASE]
-         return _keysets.setdefault((term, fd), set)
- 
  # at this point, can we say: AAAAAAAAAAAAAAAAAAAAAARGH!
  def maybe_add_baudrate(dict, rate):
--- 38,41 ----

Index: unix_eventqueue.py
===================================================================
RCS file: /cvs/pyrepl/pyrepl/pyrepl/unix_eventqueue.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** unix_eventqueue.py	11 May 2004 17:20:35 -0000	1.2
--- unix_eventqueue.py	11 May 2004 17:56:01 -0000	1.3
***************
*** 23,27 ****
  from pyrepl import keymap
  from pyrepl.console import Event
! import curses, termios
  from termios import tcgetattr, VERASE
  
--- 23,27 ----
  from pyrepl import keymap
  from pyrepl.console import Event
! import curses
  from termios import tcgetattr, VERASE