[Python-checkins] python/dist/src/Lib/idlelib ColorDelegator.py, 1.11, 1.12 EditorWindow.py, 1.54, 1.55 FileList.py, 1.6, 1.7 GrepDialog.py, 1.4, 1.5 ObjectBrowser.py, 1.4, 1.5 ParenMatch.py, 1.7, 1.8 PyShell.py, 1.85, 1.86 RemoteDebugger.py, 1.10, 1.11 ScriptBinding.py, 1.26, 1.27 TreeWidget.py, 1.7, 1.8 UndoDelegator.py, 1.4, 1.5 WidgetRedirector.py, 1.3, 1.4 aboutDialog.py, 1.14, 1.15 configDialog.py, 1.55, 1.56 configHandler.py, 1.32, 1.33 rpc.py, 1.28, 1.29 textView.py, 1.4, 1.5

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Thu Feb 12 12:35:43 EST 2004


Update of /cvsroot/python/python/dist/src/Lib/idlelib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21620/Lib/idlelib

Modified Files:
	ColorDelegator.py EditorWindow.py FileList.py GrepDialog.py 
	ObjectBrowser.py ParenMatch.py PyShell.py RemoteDebugger.py 
	ScriptBinding.py TreeWidget.py UndoDelegator.py 
	WidgetRedirector.py aboutDialog.py configDialog.py 
	configHandler.py rpc.py textView.py 
Log Message:
Replace backticks with repr() or "%r"

>From SF patch #852334.


Index: ColorDelegator.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/ColorDelegator.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ColorDelegator.py	9 Jul 2003 18:48:24 -0000	1.11
--- ColorDelegator.py	12 Feb 2004 17:35:08 -0000	1.12
***************
*** 183,187 ****
                  ok = "SYNC" in self.tag_names(next + "-1c")
                  line = self.get(mark, next)
!                 ##print head, "get", mark, next, "->", `line`
                  if not line:
                      return
--- 183,187 ----
                  ok = "SYNC" in self.tag_names(next + "-1c")
                  line = self.get(mark, next)
!                 ##print head, "get", mark, next, "->", repr(line)
                  if not line:
                      return

Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/EditorWindow.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** EditorWindow.py	23 Sep 2003 20:53:10 -0000	1.54
--- EditorWindow.py	12 Feb 2004 17:35:08 -0000	1.55
***************
*** 762,766 ****
                  self.load_extension(name)
              except:
!                 print "Failed to load extension", `name`
                  import traceback
                  traceback.print_exc()
--- 762,766 ----
                  self.load_extension(name)
              except:
!                 print "Failed to load extension", repr(name)
                  import traceback
                  traceback.print_exc()
***************
*** 938,942 ****
                  self.context_use_ps1 = value
              else:
!                 raise KeyError, "bad option name: %s" % `key`
  
      # If ispythonsource and guess are true, guess a good value for
--- 938,942 ----
                  self.context_use_ps1 = value
              else:
!                 raise KeyError, "bad option name: %r" % (key,)
  
      # If ispythonsource and guess are true, guess a good value for
***************
*** 1072,1076 ****
              for context in self.num_context_lines:
                  startat = max(lno - context, 1)
!                 startatindex = `startat` + ".0"
                  rawtext = text.get(startatindex, "insert")
                  y.set_str(rawtext)
--- 1072,1076 ----
              for context in self.num_context_lines:
                  startat = max(lno - context, 1)
!                 startatindex = repr(startat) + ".0"
                  rawtext = text.get(startatindex, "insert")
                  y.set_str(rawtext)
***************
*** 1104,1108 ****
                          self.reindent_to(y.compute_backslash_indent())
                  else:
!                     assert 0, "bogus continuation type " + `c`
                  return "break"
  
--- 1104,1108 ----
                          self.reindent_to(y.compute_backslash_indent())
                  else:
!                     assert 0, "bogus continuation type %r" % (c,)
                  return "break"
  
***************
*** 1334,1338 ****
              return ""
          i = self.i = self.i + 1
!         mark = `i` + ".0"
          if self.text.compare(mark, ">=", "end"):
              return ""
--- 1334,1338 ----
              return ""
          i = self.i = self.i + 1
!         mark = repr(i) + ".0"
          if self.text.compare(mark, ">=", "end"):
              return ""

Index: FileList.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/FileList.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FileList.py	6 Jun 2003 21:58:38 -0000	1.6
--- FileList.py	12 Feb 2004 17:35:09 -0000	1.7
***************
*** 36,40 ****
              tkMessageBox.showerror(
                  "Is A Directory",
!                 "The path %s is a directory." % `filename`,
                  master=self.root)
              return None
--- 36,40 ----
              tkMessageBox.showerror(
                  "Is A Directory",
!                 "The path %r is a directory." % (filename,),
                  master=self.root)
              return None
***************
*** 47,51 ****
              tkMessageBox.showinfo(
                  "New File",
!                 "Opening non-existent file %s" % `filename`,
                  master=self.root)
          if action is None:
--- 47,51 ----
              tkMessageBox.showinfo(
                  "New File",
!                 "Opening non-existent file %r" % (filename,),
                  master=self.root)
          if action is None:
***************
*** 103,107 ****
              tkMessageBox.showerror(
                  "Name Conflict",
!                 "You now have multiple edit windows open for %s" % `filename`,
                  master=self.root)
          self.dict[newkey] = edit
--- 103,107 ----
              tkMessageBox.showerror(
                  "Name Conflict",
!                 "You now have multiple edit windows open for %r" % (filename,),
                  master=self.root)
          self.dict[newkey] = edit

Index: GrepDialog.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/GrepDialog.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** GrepDialog.py	7 Jun 2003 03:21:17 -0000	1.4
--- GrepDialog.py	12 Feb 2004 17:35:09 -0000	1.5
***************
*** 78,82 ****
          self.close()
          pat = self.engine.getpat()
!         print "Searching %s in %s ..." % (`pat`, path)
          hits = 0
          for fn in list:
--- 78,82 ----
          self.close()
          pat = self.engine.getpat()
!         print "Searching %r in %s ..." % (pat, path)
          hits = 0
          for fn in list:

Index: ObjectBrowser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/ObjectBrowser.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ObjectBrowser.py	16 Sep 2002 22:16:05 -0000	1.4
--- ObjectBrowser.py	12 Feb 2004 17:35:09 -0000	1.5
***************
*** 98,102 ****
              def setfunction(value, key=key, object=self.object):
                  object[key] = value
!             item = make_objecttreeitem(`key` + ":", value, setfunction)
              sublist.append(item)
          return sublist
--- 98,102 ----
              def setfunction(value, key=key, object=self.object):
                  object[key] = value
!             item = make_objecttreeitem("%r:" % (key,), value, setfunction)
              sublist.append(item)
          return sublist

Index: ParenMatch.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/ParenMatch.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ParenMatch.py	17 May 2003 03:51:57 -0000	1.7
--- ParenMatch.py	12 Feb 2004 17:35:09 -0000	1.8
***************
*** 143,147 ****
          for context in self.num_context_lines:
              startat = max(lno - context, 1)
!             startatindex = `startat` + ".0"
              # rawtext needs to contain everything up to the last
              # character, which was the close paren.  the parser also
--- 143,147 ----
          for context in self.num_context_lines:
              startat = max(lno - context, 1)
!             startatindex = repr(startat) + ".0"
              # rawtext needs to contain everything up to the last
              # character, which was the close paren.  the parser also

Index: PyShell.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/PyShell.py,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** PyShell.py	21 Jan 2004 22:10:01 -0000	1.85
--- PyShell.py	12 Feb 2004 17:35:09 -0000	1.86
***************
*** 336,342 ****
                                         default=False, type='bool')
          if __name__ == 'idlelib.PyShell':
!             command = "__import__('idlelib.run').run.main(" + `del_exitf` +")"
          else:
!             command = "__import__('run').main(" + `del_exitf` + ")"
          if sys.platform[:3] == 'win' and ' ' in sys.executable:
              # handle embedded space in path by quoting the argument
--- 336,342 ----
                                         default=False, type='bool')
          if __name__ == 'idlelib.PyShell':
!             command = "__import__('idlelib.run').run.main(%r)" % (del_exitf,)
          else:
!             command = "__import__('run').main(%r)" % (del_exitf,)
          if sys.platform[:3] == 'win' and ' ' in sys.executable:
              # handle embedded space in path by quoting the argument
***************
*** 455,464 ****
          self.runcommand("""if 1:
          import sys as _sys
!         _sys.path = %s
          del _sys
          _msg = 'Use File/Exit or your end-of-file key to quit IDLE'
          __builtins__.quit = __builtins__.exit = _msg
          del _msg
!         \n""" % `sys.path`)
  
      active_seq = None
--- 455,464 ----
          self.runcommand("""if 1:
          import sys as _sys
!         _sys.path = %r
          del _sys
          _msg = 'Use File/Exit or your end-of-file key to quit IDLE'
          __builtins__.quit = __builtins__.exit = _msg
          del _msg
!         \n""" % (sys.path,))
  
      active_seq = None
***************
*** 484,488 ****
              if how == "OK":
                  if what is not None:
!                     print >>console, `what`
              elif how == "EXCEPTION":
                  if self.tkconsole.getvar("<<toggle-jit-stack-viewer>>"):
--- 484,488 ----
              if how == "OK":
                  if what is not None:
!                     print >>console, repr(what)
              elif how == "EXCEPTION":
                  if self.tkconsole.getvar("<<toggle-jit-stack-viewer>>"):
***************
*** 590,594 ****
          "Prepend sys.path with file's directory if not already included"
          self.runcommand("""if 1:
!             _filename = %s
              import sys as _sys
              from os.path import dirname as _dirname
--- 590,594 ----
          "Prepend sys.path with file's directory if not already included"
          self.runcommand("""if 1:
!             _filename = %r
              import sys as _sys
              from os.path import dirname as _dirname
***************
*** 597,601 ****
                  _sys.path.insert(0, _dir)
              del _filename, _sys, _dirname, _dir
!             \n""" % `filename`)
  
      def showsyntaxerror(self, filename=None):
--- 597,601 ----
                  _sys.path.insert(0, _dir)
              del _filename, _sys, _dirname, _dir
!             \n""" % (filename,))
  
      def showsyntaxerror(self, filename=None):
***************
*** 1334,1340 ****
          shell.interp.runcommand("""if 1:
              import sys as _sys
!             _sys.argv = %s
              del _sys
!             \n""" % `sys.argv`)
          if cmd:
              shell.interp.execsource(cmd)
--- 1334,1340 ----
          shell.interp.runcommand("""if 1:
              import sys as _sys
!             _sys.argv = %r
              del _sys
!             \n""" % (sys.argv,))
          if cmd:
              shell.interp.execsource(cmd)

Index: RemoteDebugger.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/RemoteDebugger.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** RemoteDebugger.py	12 May 2003 02:33:47 -0000	1.10
--- RemoteDebugger.py	12 Feb 2004 17:35:09 -0000	1.11
***************
*** 95,99 ****
  
      def get_stack(self, fid, tbid):
!         ##print >>sys.__stderr__, "get_stack(%s, %s)" % (`fid`, `tbid`)
          frame = frametable[fid]
          if tbid is None:
--- 95,99 ----
  
      def get_stack(self, fid, tbid):
!         ##print >>sys.__stderr__, "get_stack(%r, %r)" % (fid, tbid)
          frame = frametable[fid]
          if tbid is None:
***************
*** 296,300 ****
          ##print "**IdbProxy.call %s %s %s" % (methodname, args, kwargs)
          value = self.conn.remotecall(self.oid, methodname, args, kwargs)
!         ##print "**IdbProxy.call %s returns %s" % (methodname, `value`)
          return value
  
--- 296,300 ----
          ##print "**IdbProxy.call %s %s %s" % (methodname, args, kwargs)
          value = self.conn.remotecall(self.oid, methodname, args, kwargs)
!         ##print "**IdbProxy.call %s returns %r" % (methodname, value)
          return value
  

Index: ScriptBinding.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/ScriptBinding.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** ScriptBinding.py	21 Jan 2004 18:54:30 -0000	1.26
--- ScriptBinding.py	12 Feb 2004 17:35:09 -0000	1.27
***************
*** 146,150 ****
          # XXX Too often this discards arguments the user just set...
          interp.runcommand("""if 1:
!             _filename = %s
              import sys as _sys
              from os.path import basename as _basename
--- 146,150 ----
          # XXX Too often this discards arguments the user just set...
          interp.runcommand("""if 1:
!             _filename = %r
              import sys as _sys
              from os.path import basename as _basename
***************
*** 153,159 ****
                  _sys.argv = [_filename]
              import os as _os
!             _os.chdir(%s)
              del _filename, _sys, _basename, _os
!             \n""" % (`filename`, `dirname`))
          interp.prepend_syspath(filename)
          interp.runcode(code)
--- 153,159 ----
                  _sys.argv = [_filename]
              import os as _os
!             _os.chdir(%r)
              del _filename, _sys, _basename, _os
!             \n""" % (filename, dirname))
          interp.prepend_syspath(filename)
          interp.runcode(code)

Index: TreeWidget.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/TreeWidget.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TreeWidget.py	9 Jul 2003 18:48:24 -0000	1.7
--- TreeWidget.py	12 Feb 2004 17:35:09 -0000	1.8
***************
*** 32,36 ****
      ICONDIR = _icondir
  elif not os.path.isdir(ICONDIR):
!     raise RuntimeError, "can't find icon directory (%s)" % `ICONDIR`
  
  def listicons(icondir=ICONDIR):
--- 32,36 ----
      ICONDIR = _icondir
  elif not os.path.isdir(ICONDIR):
!     raise RuntimeError, "can't find icon directory (%r)" % (ICONDIR,)
  
  def listicons(icondir=ICONDIR):

Index: UndoDelegator.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/UndoDelegator.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** UndoDelegator.py	30 Nov 2002 19:04:07 -0000	1.4
--- UndoDelegator.py	12 Feb 2004 17:35:09 -0000	1.5
***************
*** 178,182 ****
          if self.tags is None:
              t = t[:-1]
!         return s + `t`
  
      def do(self, text):
--- 178,182 ----
          if self.tags is None:
              t = t[:-1]
!         return s + repr(t)
  
      def do(self, text):
***************
*** 311,315 ****
          strs = []
          for cmd in self.cmds:
!             strs.append("    " + `cmd`)
          return s + "(\n" + ",\n".join(strs) + "\n)"
  
--- 311,315 ----
          strs = []
          for cmd in self.cmds:
!             strs.append("    %r" % (cmd,))
          return s + "(\n" + ",\n".join(strs) + "\n)"
  

Index: WidgetRedirector.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/WidgetRedirector.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WidgetRedirector.py	9 Jul 2003 18:48:24 -0000	1.3
--- WidgetRedirector.py	12 Feb 2004 17:35:09 -0000	1.4
***************
*** 70,74 ****
  
      def __repr__(self):
!         return "OriginalCommand(%s, %s)" % (`self.redir`, `self.name`)
  
      def __call__(self, *args):
--- 70,74 ----
  
      def __repr__(self):
!         return "OriginalCommand(%r, %r)" % (self.redir, self.name)
  
      def __call__(self, *args):

Index: aboutDialog.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/aboutDialog.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** aboutDialog.py	28 Oct 2003 21:57:10 -0000	1.14
--- aboutDialog.py	12 Feb 2004 17:35:09 -0000	1.15
***************
*** 67,71 ****
          labelPythonVer.grid(row=9, column=0, sticky=W, padx=10, pady=0)
          # handle weird tk version num in windoze python >= 1.6 (?!?)
!         tkVer = `TkVersion`.split('.')
          tkVer[len(tkVer)-1] = str('%.3g' % (float('.'+tkVer[len(tkVer)-1])))[2:]
          if tkVer[len(tkVer)-1] == '':
--- 67,71 ----
          labelPythonVer.grid(row=9, column=0, sticky=W, padx=10, pady=0)
          # handle weird tk version num in windoze python >= 1.6 (?!?)
!         tkVer = repr(TkVersion).split('.')
          tkVer[len(tkVer)-1] = str('%.3g' % (float('.'+tkVer[len(tkVer)-1])))[2:]
          if tkVer[len(tkVer)-1] == '':
***************
*** 142,147 ****
                  import tkMessageBox
                  tkMessageBox.showerror(title='File Load Error',
!                                        message='Unable to load file '+
!                                        `fn`+' .',
                                         parent=self)
                  return
--- 142,146 ----
                  import tkMessageBox
                  tkMessageBox.showerror(title='File Load Error',
!                                        message='Unable to load file %r .' % (fn,),
                                         parent=self)
                  return

Index: configDialog.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/configDialog.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** configDialog.py	9 Jul 2003 18:48:24 -0000	1.55
--- configDialog.py	12 Feb 2004 17:35:09 -0000	1.56
***************
*** 719,723 ****
          keySetName=self.customKeys.get()
          if not tkMessageBox.askyesno('Delete Key Set','Are you sure you wish '+
!                                      'to delete the key set '+`keySetName`+' ?',
                                       parent=self):
              return
--- 719,723 ----
          keySetName=self.customKeys.get()
          if not tkMessageBox.askyesno('Delete Key Set','Are you sure you wish '+
!                                      'to delete the key set %r ?' % (keySetName),
                                       parent=self):
              return
***************
*** 746,750 ****
          themeName=self.customTheme.get()
          if not tkMessageBox.askyesno('Delete Theme','Are you sure you wish '+
!                                      'to delete the theme '+`themeName`+' ?',
                                       parent=self):
              return
--- 746,750 ----
          themeName=self.customTheme.get()
          if not tkMessageBox.askyesno('Delete Theme','Are you sure you wish '+
!                                      'to delete the theme %r ?' % (themeName,),
                                       parent=self):
              return

Index: configHandler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/configHandler.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** configHandler.py	24 Nov 2003 05:26:16 -0000	1.32
--- configHandler.py	12 Feb 2004 17:35:09 -0000	1.33
***************
*** 232,239 ****
              return self.defaultCfg[configType].Get(section, option, type=type)
          else: #returning default, print warning
!             warning=('\n Warning: configHandler.py - IdleConf.GetOption -\n'+
!                        ' problem retrieving configration option '+`option`+'\n'+
!                        ' from section '+`section`+'.\n'+
!                        ' returning default value: '+`default`+'\n')
              sys.stderr.write(warning)
              return default
--- 232,240 ----
              return self.defaultCfg[configType].Get(section, option, type=type)
          else: #returning default, print warning
!             warning=('\n Warning: configHandler.py - IdleConf.GetOption -\n'
!                        ' problem retrieving configration option %r\n'
!                        ' from section %r.\n'
!                        ' returning default value: %r\n' % 
!                        (option, section, default))
              sys.stderr.write(warning)
              return default
***************
*** 332,339 ****
              if not cfgParser.has_option(themeName,element):
                  #we are going to return a default, print warning
!                 warning=('\n Warning: configHandler.py - IdleConf.GetThemeDict'+
!                            ' -\n problem retrieving theme element '+`element`+
!                            '\n from theme '+`themeName`+'.\n'+
!                            ' returning default value: '+`theme[element]`+'\n')
                  sys.stderr.write(warning)
              colour=cfgParser.Get(themeName,element,default=theme[element])
--- 333,341 ----
              if not cfgParser.has_option(themeName,element):
                  #we are going to return a default, print warning
!                 warning=('\n Warning: configHandler.py - IdleConf.GetThemeDict'
!                            ' -\n problem retrieving theme element %r'
!                            '\n from theme %r.\n'
!                            ' returning default value: %r\n' %
!                            (element, themeName, theme[element]))
                  sys.stderr.write(warning)
              colour=cfgParser.Get(themeName,element,default=theme[element])
***************
*** 562,569 ****
                      keyBindings[event]=binding
                  else: #we are going to return a default, print warning
!                     warning=('\n Warning: configHandler.py - IdleConf.GetCoreKeys'+
!                                ' -\n problem retrieving key binding for event '+
!                                `event`+'\n from key set '+`keySetName`+'.\n'+
!                                ' returning default value: '+`keyBindings[event]`+'\n')
                      sys.stderr.write(warning)
          return keyBindings
--- 564,572 ----
                      keyBindings[event]=binding
                  else: #we are going to return a default, print warning
!                     warning=('\n Warning: configHandler.py - IdleConf.GetCoreKeys'
!                                ' -\n problem retrieving key binding for event %r'
!                                '\n from key set %r.\n'
!                                ' returning default value: %r\n' %
!                                (event, keySetName, keyBindings[event]))
                      sys.stderr.write(warning)
          return keyBindings

Index: rpc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/rpc.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** rpc.py	21 Jan 2004 19:21:11 -0000	1.28
--- rpc.py	12 Feb 2004 17:35:09 -0000	1.29
***************
*** 59,63 ****
  #  def pickle_function(fn):
  #      assert isinstance(fn, type.FunctionType)
! #      return `fn`
  
  copy_reg.pickle(types.CodeType, pickle_code, unpickle_code)
--- 59,63 ----
  #  def pickle_function(fn):
  #      assert isinstance(fn, type.FunctionType)
! #      return repr(fn)
  
  copy_reg.pickle(types.CodeType, pickle_code, unpickle_code)
***************
*** 171,175 ****
              return ("ERROR", "Bad request format")
          if not self.objtable.has_key(oid):
!             return ("ERROR", "Unknown object id: %s" % `oid`)
          obj = self.objtable[oid]
          if methodname == "__methods__":
--- 171,175 ----
              return ("ERROR", "Bad request format")
          if not self.objtable.has_key(oid):
!             return ("ERROR", "Unknown object id: %r" % (oid,))
          obj = self.objtable[oid]
          if methodname == "__methods__":
***************
*** 182,186 ****
              return ("OK", attributes)
          if not hasattr(obj, methodname):
!             return ("ERROR", "Unsupported method name: %s" % `methodname`)
          method = getattr(obj, methodname)
          try:
--- 182,186 ----
              return ("OK", attributes)
          if not hasattr(obj, methodname):
!             return ("ERROR", "Unsupported method name: %r" % (methodname,))
          method = getattr(obj, methodname)
          try:
***************
*** 322,326 ****
              s = pickle.dumps(message)
          except pickle.PicklingError:
!             print >>sys.__stderr__, "Cannot pickle:", `message`
              raise
          s = struct.pack("<i", len(s)) + s
--- 322,326 ----
              s = pickle.dumps(message)
          except pickle.PicklingError:
!             print >>sys.__stderr__, "Cannot pickle:", repr(message)
              raise
          s = struct.pack("<i", len(s)) + s
***************
*** 378,382 ****
          except pickle.UnpicklingError:
              print >>sys.__stderr__, "-----------------------"
!             print >>sys.__stderr__, "cannot unpickle packet:", `packet`
              traceback.print_stack(file=sys.__stderr__)
              print >>sys.__stderr__, "-----------------------"
--- 378,382 ----
          except pickle.UnpicklingError:
              print >>sys.__stderr__, "-----------------------"
!             print >>sys.__stderr__, "cannot unpickle packet:", repr(packet)
              traceback.print_stack(file=sys.__stderr__)
              print >>sys.__stderr__, "-----------------------"

Index: textView.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/textView.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** textView.py	12 Jun 2003 04:20:56 -0000	1.4
--- textView.py	12 Feb 2004 17:35:09 -0000	1.5
***************
*** 47,51 ****
          except IOError:
              tkMessageBox.showerror(title='File Load Error',
!                     message='Unable to load file '+`fileName`+' .')
          else:
              self.textView.insert(0.0,textFile.read())
--- 47,51 ----
          except IOError:
              tkMessageBox.showerror(title='File Load Error',
!                     message='Unable to load file %r .' % (fileName,))
          else:
              self.textView.insert(0.0,textFile.read())




More information about the Python-checkins mailing list