[Idle-dev] CVS: idle CREDITS.txt,1.5,1.6 NEWS.txt,1.17,1.18 idle,1.9,1.10 idle.py,1.7,1.8 idle.pyw,1.6,1.7

Kurt B. Kaiser kbk@users.sourceforge.net
Fri, 16 May 2003 20:15:50 -0700


Update of /cvsroot/idlefork/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv12843

Modified Files:
	CREDITS.txt NEWS.txt idle idle.py idle.pyw 
Log Message:
Noam Raphael's patch.
SF Patch 686254 "Run IDLEfork from any directory without set-up"

Allows IDLE to run when not installed and cwd is not the IDLE directory.

I took the liberty of moving it to the startup scripts since once IDLEfork
is again a part of Python it will be superfluous and I don't want it to
be forgotten.  But it is very useful for those using IDLEfork standalone!

M CREDITS.txt
M NEWS.txt
M idle
M idle.py
M idle.pyw


Index: CREDITS.txt
===================================================================
RCS file: /cvsroot/idlefork/idle/CREDITS.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** CREDITS.txt	25 Apr 2003 16:37:31 -0000	1.5
--- CREDITS.txt	17 May 2003 03:15:48 -0000	1.6
***************
*** 14,19 ****
  0.8.1 and later are Stephen M. Gava, who implemented the Configuration GUI, the
  new configuration system, and the new About menu, and Kurt B. Kaiser, who
! completed the integration of the RPC and remote debugger, and made a number of
! usability enhancements.
  
  Other contributors include Raymond Hettinger, Tony Lownds (Mac integration),
--- 14,19 ----
  0.8.1 and later are Stephen M. Gava, who implemented the Configuration GUI, the
  new configuration system, and the new About menu, and Kurt B. Kaiser, who
! completed the integration of the RPC and remote debugger, implemented the
! threaded subprocess, and made a number of usability enhancements.
  
  Other contributors include Raymond Hettinger, Tony Lownds (Mac integration),
***************
*** 21,26 ****
  integration and persistent breakpoints).
  
! Hernan Foffani, Christos Georgiou, Jason Orendorff, Josh Robb, and Bruce
! Sherwood have submitted useful patches.  Thanks, guys!
  
  There are others who should be included here, especially those who contributed
--- 21,27 ----
  integration and persistent breakpoints).
  
! Hernan Foffani, Christos Georgiou, Martin v. Loewis, Jason Orendorff,
! Noam Raphael, Josh Robb, and Bruce Sherwood have submitted useful patches.
! Thanks, guys!
  
  There are others who should be included here, especially those who contributed

Index: NEWS.txt
===================================================================
RCS file: /cvsroot/idlefork/idle/NEWS.txt,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** NEWS.txt	15 May 2003 03:19:41 -0000	1.17
--- NEWS.txt	17 May 2003 03:15:48 -0000	1.18
***************
*** 8,11 ****
--- 8,18 ----
  *Release date: XX-XXX-2003*
  
+ - Allow IDLE to run when not installed and cwd is not the IDLE directory
+   SF Patch 686254 "Run IDLEfork from any directory without set-up" - Raphael
+ 
+ - When a module is run from an EditorWindow: if its directory is not in
+   sys.path, prepend it.  This allows the module to import other modules in
+   the same directory.  Do the same for a script run from the command line.
+ 
  - Interrupt the subprocess if it is running when the user attempts to 
    restart the shell, run a module, or exit.
***************
*** 14,20 ****
    command line.
  
  - Added a comment to the shell startup header to indicate when IDLE is not
!   using the subprocess.  (For now, set PyShell.use_subprocess to False to run
!   in this mode.)
  
  - Restore the ability to run without the subprocess.  This can be important for
--- 21,29 ----
    command line.
  
+ - Added a -n command line switch to start IDLE without the subprocess.
+   Removed the Shell menu when running in that mode.  Updated help messages.
+ 
  - Added a comment to the shell startup header to indicate when IDLE is not
!   using the subprocess.
  
  - Restore the ability to run without the subprocess.  This can be important for

Index: idle
===================================================================
RCS file: /cvsroot/idlefork/idle/idle,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** idle	2 Jan 2003 17:09:34 -0000	1.9
--- idle	17 May 2003 03:15:48 -0000	1.10
***************
*** 5,10 ****
  except ImportError:
      # IDLE is not installed, but maybe PyShell is on sys.path:
!     import PyShell
!     PyShell.main()
  else:
      idlelib.PyShell.main()
--- 5,20 ----
  except ImportError:
      # IDLE is not installed, but maybe PyShell is on sys.path:
!     try:
!         import PyShell
!     except ImportError:
!         print "Can't locate PyShell.py"
!     else:
!         import os
!         idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
!         if idledir != os.getcwd():
!             # We're not in the IDLE directory, help the subprocess find run.py
!             pypath = os.environ.get('PYTHONPATH', '')
!             os.environ['PYTHONPATH'] = pypath + ':' + idledir
!         PyShell.main()
  else:
      idlelib.PyShell.main()

Index: idle.py
===================================================================
RCS file: /cvsroot/idlefork/idle/idle.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** idle.py	2 Jan 2003 17:09:34 -0000	1.7
--- idle.py	17 May 2003 03:15:48 -0000	1.8
***************
*** 5,10 ****
  except ImportError:
      # IDLE is not installed, but maybe PyShell is on sys.path:
!     import PyShell
!     PyShell.main()
  else:
      idlelib.PyShell.main()
--- 5,20 ----
  except ImportError:
      # IDLE is not installed, but maybe PyShell is on sys.path:
!     try:
!         import PyShell
!     except ImportError:
!         print "Can't locate PyShell.py"
!     else:
!         import os
!         idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
!         if idledir != os.getcwd():
!             # We're not in the IDLE directory, help the subprocess find run.py
!             pypath = os.environ.get('PYTHONPATH', '')
!             os.environ['PYTHONPATH'] = pypath + ':' + idledir
!         PyShell.main()
  else:
      idlelib.PyShell.main()

Index: idle.pyw
===================================================================
RCS file: /cvsroot/idlefork/idle/idle.pyw,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** idle.pyw	2 Jan 2003 17:09:34 -0000	1.6
--- idle.pyw	17 May 2003 03:15:48 -0000	1.7
***************
*** 1,10 ****
- #!/usr/bin/python
- 
  try:
      import idlelib.PyShell
  except ImportError:
      # IDLE is not installed, but maybe PyShell is on sys.path:
!     import PyShell
!     PyShell.main()
  else:
      idlelib.PyShell.main()
--- 1,18 ----
  try:
      import idlelib.PyShell
  except ImportError:
      # IDLE is not installed, but maybe PyShell is on sys.path:
!     try:
!         import PyShell
!     except ImportError:
!         print "Can't locate PyShell.py"
!     else:
!         import os
!         idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
!         if idledir != os.getcwd():
!             # We're not in the IDLE directory, help the subprocess find run.py
!             pypath = os.environ.get('PYTHONPATH', '')
!             os.environ['PYTHONPATH'] = pypath + ':' + idledir
!         PyShell.main()
  else:
      idlelib.PyShell.main()