[Idle-dev] CVS: idle EditorWindow.py,1.23,1.24 OutputWindow.py,1.3,1.4 PyShell.py,1.14,1.15 ScriptBinding.py,1.5,1.6 config-extensions.def,1.5,1.6 config.txt,1.4,1.5 ExecBinding.py,1.3,NONE Remote.py,1.2,NONE loader.py,1.2,NONE protocol.py,1.3,NONE spawn.py,1.4,NONE

Kurt B. Kaiser kbk@users.sourceforge.net
Tue, 11 Jun 2002 20:29:00 -0700


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv27665

Modified Files:
	EditorWindow.py OutputWindow.py PyShell.py ScriptBinding.py 
	config-extensions.def config.txt 
Removed Files:
	ExecBinding.py Remote.py loader.py protocol.py spawn.py 
Log Message:
Rework the code to have only the GvR RPC.  Output from execution of user
code is directed to the Shell.


Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** EditorWindow.py	22 Apr 2002 00:38:26 -0000	1.23
--- EditorWindow.py	12 Jun 2002 03:28:57 -0000	1.24
***************
*** 1,8 ****
- # changes by dscherer@cmu.edu
- #   - created format and run menus
- #   - added silly advice dialog (apologies to Douglas Adams)
- #   - made Python Documentation work on Windows (requires win32api to
- #     do a ShellExecute(); other ways of starting a web browser are awkward)
- 
  import sys
  import os
--- 1,2 ----

Index: OutputWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/OutputWindow.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** OutputWindow.py	23 Feb 2002 23:27:08 -0000	1.3
--- OutputWindow.py	12 Jun 2002 03:28:57 -0000	1.4
***************
*** 1,12 ****
- # changes by dscherer@cmu.edu
- #   - OutputWindow and OnDemandOutputWindow have been hastily
- #     extended to provide readline() support, an "iomark" separate
- #     from the "insert" cursor, and scrolling to clear the window.
- #     These changes are used by the ExecBinding module to provide
- #     standard input and output for user programs.  Many of the new
- #     features are very similar to features of PyShell, which is a
- #     subclass of OutputWindow.  Someone should make some sense of
- #     this.
- 
  from Tkinter import *
  from EditorWindow import EditorWindow
--- 1,2 ----
***************
*** 14,63 ****
  import tkMessageBox
  
! from UndoDelegator import UndoDelegator
  
! class OutputUndoDelegator(UndoDelegator):
!     reading = 0
!     # Forbid insert/delete before the I/O mark, in the blank lines after
!     #   the output, or *anywhere* if we are not presently doing user input
!     def insert(self, index, chars, tags=None):
!         try:
!             if (self.delegate.compare(index, "<", "iomark") or
!                 self.delegate.compare(index, ">", "endmark") or
!                 (index!="iomark" and not self.reading)):
!                 self.delegate.bell()
!                 return
!         except TclError:
!             pass
!         UndoDelegator.insert(self, index, chars, tags)
!     def delete(self, index1, index2=None):
!         try:
!             if (self.delegate.compare(index1, "<", "iomark") or
!                 self.delegate.compare(index1, ">", "endmark") or
!                 (index2 and self.delegate.compare(index2, ">=", "endmark")) or
!                 not self.reading):
!                 self.delegate.bell()
!                 return
!         except TclError:
!             pass
!         UndoDelegator.delete(self, index1, index2)
  
! class OutputWindow(EditorWindow):
!     """An editor window that can serve as an input and output file.
!        The input support has been rather hastily hacked in, and should
!        not be trusted.
      """
  
!     UndoDelegator = OutputUndoDelegator
!     source_window = None
! 
!     def __init__(self, *args, **keywords):
!         if keywords.has_key('source_window'):
!             self.source_window = keywords['source_window']
          apply(EditorWindow.__init__, (self,) + args)
          self.text.bind("<<goto-file-line>>", self.goto_file_line)
-         self.text.bind("<<newline-and-indent>>", self.enter_callback)
-         self.text.mark_set("iomark","1.0")
-         self.text.mark_gravity("iomark", LEFT)
-         self.text.mark_set("endmark","1.0")
  
      # Customize EditorWindow
--- 4,18 ----
  import tkMessageBox
  
! class OutputWindow(EditorWindow):
  
!     """An editor window that can serve as an output file.
  
!     Also the future base class for the Python shell window.
!     This class has no input facilities.
      """
  
!     def __init__(self, *args):
          apply(EditorWindow.__init__, (self,) + args)
          self.text.bind("<<goto-file-line>>", self.goto_file_line)
  
      # Customize EditorWindow
***************
*** 70,76 ****
          return "Output"
  
-     def long_title(self):
-         return ""
- 
      def maybesave(self):
          # Override base class method -- don't ask any questions
--- 25,28 ----
***************
*** 80,140 ****
              return "no"
  
-     # Act as input file - incomplete
- 
-     def set_line_and_column(self, event=None):
-         index = self.text.index(INSERT)
-         if (self.text.compare(index, ">", "endmark")):
-           self.text.mark_set("insert", "endmark")
-         self.text.see("insert")
-         EditorWindow.set_line_and_column(self)
- 
-     reading = 0
-     canceled = 0
-     endoffile = 0
- 
-     def readline(self):
-         save = self.reading
-         try:
-             self.reading = self.undo.reading = 1
-             self.text.mark_set("insert", "iomark")
-             self.text.see("insert")
-             self.top.mainloop()
-         finally:
-             self.reading = self.undo.reading = save
-         line = self.text.get("input", "iomark")
-         if self.canceled:
-             self.canceled = 0
-             raise KeyboardInterrupt
-         if self.endoffile:
-             self.endoffile = 0
-             return ""
-         return line or '\n'
- 
-     def close(self):
-         self.interrupt()
-         return EditorWindow.close(self)
- 
-     def interrupt(self):
-         if self.reading:
-             self.endoffile = 1
-             self.top.quit()
- 
-     def enter_callback(self, event):
-         if self.reading and self.text.compare("insert", ">=", "iomark"):
-             self.text.mark_set("input", "iomark")
-             self.text.mark_set("iomark", "insert")
-             self.write('\n',"iomark")
-             self.text.tag_add("stdin", "input", "iomark")
-             self.text.update_idletasks()
-             self.top.quit() # Break out of recursive mainloop() in raw_input()
- 
-         return "break"
- 
      # Act as output file
  
!     def write(self, s, tags=(), mark="iomark"):
!         self.text.mark_gravity(mark, RIGHT)
!         self.text.insert(mark, s, tags)
!         self.text.mark_gravity(mark, LEFT)
          self.text.see(mark)
          self.text.update()
--- 32,39 ----
              return "no"
  
      # Act as output file
  
!     def write(self, s, tags=(), mark="insert"):
!         self.text.insert(mark, str(s), tags)
          self.text.see(mark)
          self.text.update()
***************
*** 184,195 ****
                  return
          filename, lineno = result
!         edit = self.untitled(filename) or self.flist.open(filename)
          edit.gotoline(lineno)
-         edit.wakeup()
- 
-     def untitled(self, filename):
-         if filename!='Untitled' or not self.source_window or self.source_window.io.filename:
-             return None
-         return self.source_window
  
      def _file_line_helper(self, line):
--- 83,88 ----
                  return
          filename, lineno = result
!         edit = self.flist.open(filename)
          edit.gotoline(lineno)
  
      def _file_line_helper(self, line):
***************
*** 201,210 ****
              return None
          filename, lineno = m.group(1, 2)
!         if not self.untitled(filename):
!             try:
!                 f = open(filename, "r")
!                 f.close()
!             except IOError:
!                 return None
          try:
              return filename, int(lineno)
--- 94,102 ----
              return None
          filename, lineno = m.group(1, 2)
!         try:
!             f = open(filename, "r")
!             f.close()
!         except IOError:
!             return None
          try:
              return filename, int(lineno)
***************
*** 212,279 ****
              return None
  
! # This classes now used by ExecBinding.py:
  
  class OnDemandOutputWindow:
-     source_window = None
  
      tagdefs = {
          # XXX Should use IdlePrefs.ColorPrefs
-         "stdin":   {"foreground": "black"},
          "stdout":  {"foreground": "blue"},
!         "stderr":  {"foreground": "red"},
!     }   
!     
      def __init__(self, flist):
          self.flist = flist
          self.owin = None
-         self.title = "Output"
-         self.close_hook = None
-         self.old_close = None
- 
-     def owclose(self):
-         if self.close_hook:
-             self.close_hook()
-         if self.old_close:
-             self.old_close()
- 
-     def set_title(self, title):
-         self.title = title
-         if self.owin and self.owin.text:
-           self.owin.saved_change_hook()
  
!     def write(self, s, tags=(), mark="iomark"):
!         if not self.owin or not self.owin.text:
              self.setup()
          self.owin.write(s, tags, mark)
  
-     def readline(self):
-         if not self.owin or not self.owin.text:
-             self.setup()
-         return self.owin.readline()
- 
-     def scroll_clear(self):
-         if self.owin and self.owin.text:
-            lineno = self.owin.getlineno("endmark")
-            self.owin.text.mark_set("insert","endmark")
-            self.owin.text.yview(float(lineno))
-            self.owin.wakeup()
-     
      def setup(self):
!         self.owin = owin = OutputWindow(self.flist, source_window = self.source_window)
!         owin.short_title = lambda self=self: self.title
          text = owin.text
- 
-         self.old_close = owin.close_hook
-         owin.close_hook = self.owclose
- 
-         # xxx Bad hack: 50 blank lines at the bottom so that
-         #     we can scroll the top of the window to the output
-         #     cursor in scroll_clear().  There must be a better way...
-         owin.text.mark_gravity('endmark', LEFT)
-         owin.text.insert('iomark', '\n'*50)
-         owin.text.mark_gravity('endmark', RIGHT)
-         
          for tag, cnf in self.tagdefs.items():
              if cnf:
                  apply(text.tag_configure, (tag,), cnf)
          text.tag_raise('sel')
--- 104,155 ----
              return None
  
! # These classes are currently not used but might come in handy
  
  class OnDemandOutputWindow:
  
      tagdefs = {
          # XXX Should use IdlePrefs.ColorPrefs
          "stdout":  {"foreground": "blue"},
!         "stderr":  {"foreground": "#007700"},
!     }
! 
      def __init__(self, flist):
          self.flist = flist
          self.owin = None
  
!     def write(self, s, tags, mark):
!         if not self.owin:
              self.setup()
          self.owin.write(s, tags, mark)
  
      def setup(self):
!         self.owin = owin = OutputWindow(self.flist)
          text = owin.text
          for tag, cnf in self.tagdefs.items():
              if cnf:
                  apply(text.tag_configure, (tag,), cnf)
          text.tag_raise('sel')
+         self.write = self.owin.write
+ 
+ #class PseudoFile:
+ #
+ #      def __init__(self, owin, tags, mark="end"):
+ #          self.owin = owin
+ #          self.tags = tags
+ #          self.mark = mark
+ 
+ #      def write(self, s):
+ #          self.owin.write(s, self.tags, self.mark)
+ 
+ #      def writelines(self, l):
+ #          map(self.write, l)
+ 
+ #      def flush(self):
+ #          pass
+ 
+ 
+ 
+ 
+ 
+ 
+ 

Index: PyShell.py
===================================================================
RCS file: /cvsroot/idlefork/idle/PyShell.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** PyShell.py	26 May 2002 13:36:41 -0000	1.14
--- PyShell.py	12 Jun 2002 03:28:57 -0000	1.15
***************
*** 1,33 ****
  #! /usr/bin/env python
  
- # changes by dscherer@cmu.edu
- 
- #     The main() function has been replaced by a whole class, in order to
- #     address the constraint that only one process can sit on the port
- #     hard-coded into the loader.
- 
- #     It attempts to load the RPC protocol server and publish itself.  If
- #     that fails, it assumes that some other copy of IDLE is already running
- #     on the port and attempts to contact it.  It then uses the RPC mechanism
- #     to ask that copy to do whatever it was instructed (via the command
- #     line) to do.  (Think netscape -remote).  The handling of command line
- #     arguments for remotes is still very incomplete.
- 
- #     Default behavior (no command line options) is to open an editor window
- #     instead of starting the Python Shell.  However, if called as
- #     Pyshell.main(0), the Shell will be started instead of the editor window.
- 
- #     In the default editor mode, if files are specified, they are opened.
- 
- #     If any command line options are specified, a shell does appear, and if
- #     the -e option is used, both a shell and an editor window open.
- 
  import os
- import spawn
  import sys
  import string
  import getopt
  import re
- import protocol
  import socket
  import time
--- 1,9 ----
***************
*** 45,49 ****
  from ColorDelegator import ColorDelegator
  from UndoDelegator import UndoDelegator
! from OutputWindow import OutputWindow, OnDemandOutputWindow
  from configHandler import idleConf
  import idlever
--- 21,25 ----
  from ColorDelegator import ColorDelegator
  from UndoDelegator import UndoDelegator
! from OutputWindow import OutputWindow
  from configHandler import idleConf
  import idlever
***************
*** 51,55 ****
  import rpc
  
! use_subprocess = 0 # Set to 1 to spawn subprocess for command execution
  
  # Change warnings module to write to sys.__stderr__
--- 27,32 ----
  import rpc
  
! # XX hardwire this for now, remove later  KBK 09Jun02
! use_subprocess = 1 # Set to 1 to spawn subprocess for command execution
  
  # Change warnings module to write to sys.__stderr__
***************
*** 205,211 ****
          self.save_warnings_filters = None
  
-         global flist
-         self.output = OnDemandOutputWindow(flist)
- 
      rpcclt = None
      rpcpid = None
--- 182,185 ----
***************
*** 227,238 ****
                      print >>sys.__stderr__, "Socket error:", err, "; retry..."
          else:
!             # XXX Make this a dialog?
              print >>sys.__stderr__, "Can't spawn subprocess!"
              return
!         self.output.stdout=PseudoFile(self.output, "stdout")
!         self.output.stderr=PseudoFile(self.output, "stderr")
!         self.rpcclt.register("stdin", self.output)
!         self.rpcclt.register("stdout", self.output.stdout)
!         self.rpcclt.register("stderr", self.output.stderr)
          self.rpcclt.register("flist", self.tkconsole.flist)
          self.poll_subprocess()
--- 201,212 ----
                      print >>sys.__stderr__, "Socket error:", err, "; retry..."
          else:
!             # XXX Make this a dialog?  #GvR
              print >>sys.__stderr__, "Can't spawn subprocess!"
+             # XXX Add Stephen's error msg, resolve the two later... KBK 09Jun02
+             display_port_binding_error()
              return
!         self.rpcclt.register("stdin", self.tkconsole)
!         self.rpcclt.register("stdout", self.tkconsole.stdout)
!         self.rpcclt.register("stderr", self.tkconsole.stderr)
          self.rpcclt.register("flist", self.tkconsole.flist)
          self.poll_subprocess()
***************
*** 630,634 ****
      def begin(self):
          self.resetoutput()
!         self.write("Python %s on %s\n%s\nIDLE Fork %s -- press F1 for help\n" %
                     (sys.version, sys.platform, self.COPYRIGHT,
                      idlever.IDLE_VERSION))
--- 604,608 ----
      def begin(self):
          self.resetoutput()
!         self.write("Python %s on %s\n%s\nGRPC IDLE Fork %s\n" %
                     (sys.version, sys.platform, self.COPYRIGHT,
                      idlever.IDLE_VERSION))
***************
*** 796,801 ****
          line = line[:i]
          more = self.interp.runsource(line)
!         if not more:
!             self.showprompt()
  
      def cancel_check(self, frame, what, args,
--- 770,776 ----
          line = line[:i]
          more = self.interp.runsource(line)
!         # XXX This was causing extra prompt with shell  KBK
! #       if not more:
! #           self.showprompt()
  
      def cancel_check(self, frame, what, args,
***************
*** 877,880 ****
--- 852,856 ----
          return 1
  
+ 
  usage_msg = """\
  usage: idle.py [-c command] [-d] [-i] [-r script] [-s] [-t title] [arg] ...
***************
*** 887,891 ****
  -i         open an interactive shell
  -i file(s) open a shell and also an editor window for each file
! -r script  use experimental remote (subprocess) execution feature 
  -s         run $IDLESTARTUP or $PYTHONSTARTUP before anything else
  -t title   set title of shell window
--- 863,867 ----
  -i         open an interactive shell
  -i file(s) open a shell and also an editor window for each file
! -r
  -s         run $IDLESTARTUP or $PYTHONSTARTUP before anything else
  -t title   set title of shell window
***************
*** 894,1078 ****
  """
  
! class usageError:
!     def __init__(self, string): self.string = string
!     def __repr__(self): return self.string
! 
! class main:
!     def __init__(self, noshell=1):
!         
!         global flist, root
!         root = Tk(className="Idle")
!         fixwordbreaks(root)
!         root.withdraw()
!         flist = PyShellFileList(root)
! 
!         # the following causes lockups and silent failures when debugging
!         # changes to EditorWindow.__init__  ; the console works fine for idle
!         # debugging in any case, so disable this unnescesary stuff.
!         #dbg=OnDemandOutputWindow(flist)
!         #dbg.set_title('IDLE Debugging Messages')
!         #sys.stdout = PseudoFile(dbg,['stdout'])
!         #sys.stderr = PseudoFile(dbg,['stderr'])
!         
!         try:
!             self.server = protocol.Server(connection_hook = self.address_ok)
!             protocol.publish( 'IDLE', self.connect )
!             self.main(sys.argv[1:], noshell)
!             return
!         except protocol.connectionLost:
!             try:
!                 client = protocol.Client()
!                 IDLE = client.getobject('IDLE')
!                 if IDLE:
!                     try:
!                         IDLE.remote( sys.argv[1:] )
!                     except usageError, msg:
!                         sys.stderr.write("Error: %s\n" % str(msg))
!                         sys.stderr.write(usage_msg)
!                     return
!             except protocol.connectionLost:
!                 pass
! 
!         #maybe the following should be handled by a tkmessagebox for 
!         #users who don't start idle from a console??
!         print """\
! IDLE cannot run.
! 
! IDLE needs to use a specific TCP/IP port (7454) in order to execute and
! debug programs. IDLE is unable to bind to this port, and so cannot
! start. Here are some possible causes of this problem:
  
!   1. TCP/IP networking is not installed or not working on this computer
!   2. Another program is running that uses this port
!   3. Another copy of IDLE stopped responding but is still bound to the port
!   4. Personal firewall software is preventing IDLE from using this port
  
! IDLE makes and accepts connections only with this computer, and does not
! communicate over the internet in any way. It's use of port 7454 should not 
! be a security risk on a single-user machine.
! """
!         dbg.owin.gotoline(1)
!         dbg.owin.remove_selection()
!         root.mainloop() # wait for user to read message
! 
!     def idle(self):
!         spawn.kill_zombies()
!         self.server.rpc_loop()
!         root.after(25, self.idle)
! 
!     # We permit connections from localhost only
!     def address_ok(self, addr):
!         return addr[0] == '127.0.0.1'
! 
!     def connect(self, client, addr):
!         return self
! 
!     def remote( self, argv ):
!         # xxx Should make this behavior match the behavior in main, or redo
!         #     command line options entirely.
  
!         try:
!             opts, args = getopt.getopt(argv, "c:deist:")
!         except getopt.error, msg:
!             raise usageError(msg)
  
          for filename in args:
              flist.open(filename)
          if not args:
              flist.new()
  
!     def main(self, argv, noshell):
!         cmd = None
!         edit = 0
!         debug = 0
!         interactive = 0
!         script = None
!         startup = 0
!         global use_subprocess
!     
!         try:
!             opts, args = getopt.getopt(sys.argv[1:], "c:deir:st:")
!         except getopt.error, msg:
!             sys.stderr.write("Error: %s\n" % str(msg))
!             sys.stderr.write(usage_msg)
!             sys.exit(2)
!     
!         for o, a in opts:
!             noshell = 0    # There are options, bring up a shell
!             if o == '-c':
!                 cmd = a
!             if o == '-d':
!                 debug = 1
!             if o == '-e':
!                 edit = 1
!             if o == '-i':
!                 interactive = 1
!             if o == '-r':
!                 edit = 1
!                 script = a
!                 use_subprocess = 1
!             if o == '-s':
!                 startup = 1
!             if o == '-t':
!                 PyShell.shell_title = a
!     
!         if noshell: edit=1
!         if interactive and args and args[0] != "-": edit = 1
!     
!         for i in range(len(sys.path)):
!             sys.path[i] = os.path.abspath(sys.path[i])
!     
!         pathx = []
!         if edit:
!             for filename in args:
!                 pathx.append(os.path.dirname(filename))
!         elif args and args[0] != "-":
!             pathx.append(os.path.dirname(args[0]))
!         else:
!             pathx.append(os.curdir)
!         for dir in pathx:
!             dir = os.path.abspath(dir)
!             if not dir in sys.path:
!                 sys.path.insert(0, dir)
! 
!         if edit:
!             for filename in args:
!                 flist.open(filename)
!             if not args:
!                 flist.new()
!         else:
!             if cmd:
!                 sys.argv = ["-c"] + args
!             else:
!                 sys.argv = args or [""]
  
!         if noshell:
!           flist.pyshell = None
!         else:
!           shell = PyShell(flist)
!           interp = shell.interp
!           flist.pyshell = shell
!       
!           if startup:
!               filename = os.environ.get("IDLESTARTUP") or \
!                          os.environ.get("PYTHONSTARTUP")
!               if filename and os.path.isfile(filename):
!                   interp.execfile(filename)
!       
!           if debug:
!               shell.open_debugger()
!           if cmd:
!               interp.execsource(cmd)
!           elif script:
!              if os.path.isfile(script):
!                  interp.execfile(script)
!              else:
!                  print "No script file: ", script
!           shell.begin()
! 
!         self.idle()
!         root.mainloop()
!         root.destroy()
  
  
  if __name__ == "__main__":
--- 870,975 ----
  """
  
! def main():
!     cmd = None
!     edit = 0
!     debug = 0
!     script = None
!     startup = 0
! 
!     try:
!         opts, args = getopt.getopt(sys.argv[1:], "c:deir:st:")
!     except getopt.error, msg:
!         sys.stderr.write("Error: %s\n" % str(msg))
!         sys.stderr.write(usage_msg)
!         sys.exit(2)
! 
!     for o, a in opts:
!         if o == '-c':
!             cmd = a
!         if o == '-d':
!             debug = 1
!         if o == '-e':
!             edit = 1
!         if o == '-r':
!             script = a
!         if o == '-s':
!             startup = 1
!         if o == '-t':
!             PyShell.shell_title = a
  
!     if args and args[0] != "-": edit = 1
  
!     for i in range(len(sys.path)):
!         sys.path[i] = os.path.abspath(sys.path[i])
  
!     pathx = []
!     if edit:
!         for filename in args:
!             pathx.append(os.path.dirname(filename))
!     elif args and args[0] != "-":
!         pathx.append(os.path.dirname(args[0]))
!     else:
!         pathx.append(os.curdir)
!     for dir in pathx:
!         dir = os.path.abspath(dir)
!         if not dir in sys.path:
!             sys.path.insert(0, dir)
! 
!     global flist, root
!     root = Tk(className="Idle")
!     fixwordbreaks(root)
!     root.withdraw()
!     flist = PyShellFileList(root)
  
+     if edit:
          for filename in args:
              flist.open(filename)
          if not args:
              flist.new()
+     else:
+         if cmd:
+             sys.argv = ["-c"] + args
+         else:
+             sys.argv = args or [""]
+ 
+     shell = PyShell(flist)
+     interp = shell.interp
+     flist.pyshell = shell
+ 
+     if startup:
+         filename = os.environ.get("IDLESTARTUP") or \
+                    os.environ.get("PYTHONSTARTUP")
+         if filename and os.path.isfile(filename):
+             interp.execfile(filename)
+ 
+     if debug:
+         shell.open_debugger()
+     if cmd:
+         interp.execsource(cmd)
+     elif script:
+         if os.path.isfile(script):
+             interp.execfile(script)
+         else:
+             print "No script file: ", script
+     shell.begin()
+     root.mainloop()
+     root.destroy()
  
! def display_port_binding_error():
!     print """\
! IDLE cannot run.
  
! IDLE needs to use a specific TCP/IP port (8833) in order to execute and
! debug programs. IDLE is unable to bind to this port, and so cannot
! start. Here are some possible causes of this problem:
! 
!   1. TCP/IP networking is not installed or not working on this computer
!   2. Another program is running that uses this port
!   3. Personal firewall software is preventing IDLE from using this port
  
+ IDLE makes and accepts connections only with this computer, and does not
+ communicate over the internet in any way. Its use of port 8833 should not 
+ be a security risk on a single-user machine.
+ """
  
  if __name__ == "__main__":

Index: ScriptBinding.py
===================================================================
RCS file: /cvsroot/idlefork/idle/ScriptBinding.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** ScriptBinding.py	26 May 2002 13:36:40 -0000	1.5
--- ScriptBinding.py	12 Jun 2002 03:28:57 -0000	1.6
***************
*** 1,16 ****
  """Extension to execute code outside the Python shell window.
  
! This adds the following commands (to the Edit menu, until there's a
! separate Python menu):
  
! - Check module (Alt-F5) does a full syntax check of the current module.
  It also runs the tabnanny to catch any inconsistent tabs.
  
! - Import module (F5) is equivalent to either import or reload of the
  current module.  The window must have been saved previously. The
  module is added to sys.modules, and is also added to the __main__
  namespace.  Output goes to the shell window.
  
! - Run module (Control-F5) does the same but executes the module's
  code in the __main__ namespace.
  
--- 1,15 ----
  """Extension to execute code outside the Python shell window.
  
! This adds the following commands:
  
! - Check module does a full syntax check of the current module.
  It also runs the tabnanny to catch any inconsistent tabs.
  
! - Import module is equivalent to either import or reload of the
  current module.  The window must have been saved previously. The
  module is added to sys.modules, and is also added to the __main__
  namespace.  Output goes to the shell window.
  
! - Run module does the same but executes the module's
  code in the __main__ namespace.
  
***************
*** 42,51 ****
  by Untabify Region (both in the Edit menu)."""
  
  class ScriptBinding:
  
      menudefs = [
!         ('edit', [None,
!                   ('Check module', '<<check-module>>'),
!                   ('Import module', '<<import-module>>'),
                    ('Run script', '<<run-script>>'),
                   ]
--- 41,52 ----
  by Untabify Region (both in the Edit menu)."""
  
+ 
+ # XXX TBD Implement stop-execution  KBK 11Jun02
  class ScriptBinding:
  
      menudefs = [
!         ('run', [None,
! #                 ('Check module', '<<check-module>>'),
! #                 ('Import module', '<<import-module>>'),
                    ('Run script', '<<run-script>>'),
                   ]

Index: config-extensions.def
===================================================================
RCS file: /cvsroot/idlefork/idle/config-extensions.def,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** config-extensions.def	11 Feb 2002 03:45:22 -0000	1.5
--- config-extensions.def	12 Jun 2002 03:28:57 -0000	1.6
***************
*** 43,57 ****
  zoom-height=<Alt-Key-F2>
  
! [ExecBinding]
! enable=1
! [ExecBinding_cfgBindings]
! run-complete-script=<Key-F5>
! stop-execution=<Key-Cancel>
  
! #[ScriptBinding] #currently ExecBinding has replaced ScriptBinding 
! #enable=0
! #[ScriptBinding_cfgBindings]
! #run-script=<Key-F5>
! #check-module=<Alt-Key-F5> <Meta-Key-F5>
  #import-module=<Control-Key-F5>
  
--- 43,57 ----
  zoom-height=<Alt-Key-F2>
  
! #[ExecBinding]  # Revert to ScriptBinding
! #enable=1
! #[ExecBinding_cfgBindings]
! #run-complete-script=<Key-F5>
! #stop-execution=<Key-Cancel>
  
! [ScriptBinding]
! enable=1
! [ScriptBinding_cfgBindings]
! run-script=<Key-F5>
! #check-module=<Alt-Key-F5>
  #import-module=<Control-Key-F5>
  

Index: config.txt
===================================================================
RCS file: /cvsroot/idlefork/idle/config.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** config.txt	3 Jan 2002 12:00:34 -0000	1.4
--- config.txt	12 Jun 2002 03:28:57 -0000	1.5
***************
*** 52,58 ****
  #[ZoomHeight]
  
! #[ScriptBinding]    # disabled in favor of ExecBinding
! 
! [ExecBinding]
  
  [CallTips]
--- 52,56 ----
  #[ZoomHeight]
  
! [ScriptBinding]
  
  [CallTips]

--- ExecBinding.py DELETED ---

--- Remote.py DELETED ---

--- loader.py DELETED ---

--- protocol.py DELETED ---

--- spawn.py DELETED ---