Commit Graph

362 Commits

Author SHA1 Message Date
Kurt B. Kaiser 62df044885 Added a config-main General option to delete sys.exitfunc. The default
is not to do that.  VPython and student environment support.

M PyShell.py
M config-main.def
M run.py
2003-05-28 01:47:46 +00:00
Kurt B. Kaiser 8d1f11b0ef Whitespace Normalization
Modified Files:	PyShell.py ScriptBinding.py buildapp.py
2003-05-26 22:20:34 +00:00
Kurt B. Kaiser 053916959a 1. SF Bug 661676
The default font is not highlighted in the Options dialog when
   IDLEfork is first installed.

2. Reduce default font to 10 pt and increase default window height to give
   a better initial impression on Windows.

M config-main.def
M configDialog.py
2003-05-26 20:35:53 +00:00
Kurt B. Kaiser 6c638b6755 Bruce Sherwood RFE/Patch
SF 661318

Adds autosave capability to IDLE and IDLE configuration dialog.

User can Run/F5 without explicit save dialog.

The default is to require the user to confirm the save.

M ScriptBinding.py
M config-main.def
M configDialog.py
2003-05-26 06:23:10 +00:00
Kurt B. Kaiser 6f80594229 Improved the RESTART annotation in the shell window when the user
restarts the shell while it is generating output.  Also improved
annotation when user repeatedly hammers the Ctrl-F6 restart.
2003-05-24 21:12:46 +00:00
Kurt B. Kaiser 36364be3bf Fix a bug in Rev 1.10 - Windows can't handle a leading ':' if the
user's PYTHONPATH is empty (though Linux can).
Modified Files:
	idle idle.py idle.pyw
2003-05-24 21:01:39 +00:00
Kurt B. Kaiser 67fd0ea46d 1. Stake Freddy.
e.g. further improve subprocess interrupt, exceptions, and termination.
2. Remove the workarounds in PyShell.py and ScriptBinding.py involving
   interrupting the subprocess prior to killing it, not necessary anymore.
3. Fix a bug introduced at PyShell Rev 1.66: was getting extra shell menu
   every time the shell window was recreated.

M PyShell.py
M ScriptBinding.py
M rpc.py
M run.py
2003-05-24 20:59:15 +00:00
Kurt B. Kaiser 88957d8d0d Fix race exposed by 2.4 GHz XP box: Don't tear down PyShell until
subprocess polling has terminated.  Tk callit gets unhappy if it can't
find the function 'after' scheduled to run.

M PyShell.py
2003-05-19 23:11:51 +00:00
Kurt B. Kaiser c626658a28 Let Python inform the user what went wrong with the import.
Modified Files:
 	idle idle.py idle.pyw
2003-05-19 02:07:44 +00:00
Kurt B. Kaiser 476740142d Whitespace Normalization 2003-05-18 02:24:32 +00:00
Kurt B. Kaiser 282f122250 Whitespace Normalization
Modified Files:
 	config-extensions.def config-highlight.def config-keys.def
 	config-main.def
2003-05-18 02:21:55 +00:00
Kurt B. Kaiser a2792bec1d Show Freddy the mirror
i.e. improve subprocess exit paths and exeception reporting
2003-05-17 21:04:10 +00:00
Tony Lownds 108c40c74c Added icon for IDLE on OS X 2003-05-17 15:14:10 +00:00
Kurt B. Kaiser 63af08aa93 Nigel Rowe's Patch
[ 735527 ] Re Bug [ 678325 ] ParenMatching Missing AutoIndent

AutoIndent was merged with EditorWindow, this patch corrects
the references in ParenMatch.
2003-05-17 03:51:57 +00:00
Kurt B. Kaiser a80d57c41d 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
2003-05-17 03:15:48 +00:00
Kurt B. Kaiser 11659ade1e 1. 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.
2. Tweak the IDLE usage message a bit more.

SF Bug 706860 (closed)
SF Patch 686254 (reject specific solution)
SF Patch 507327 (similar)

M PyShell.py
M ScriptBinding.py
2003-05-15 23:23:21 +00:00
Kurt B. Kaiser 8f570a768f 1. Add a command line switch to run without the subprocess
2. Remove the shell menu and associated bindings when running
   without the subprocess.
3. Update the IDLE Help and usage text.
4. Update display_port_binding_error to suggest using -n

M PyShell.py
M help.txt
2003-05-15 18:52:51 +00:00
Kurt B. Kaiser 5db4843c5e 1. Make the startup more robust by not spawning the subprocess if IDLE
can't acquire the port to listen on.
2. Shorten the retry and simplify the messages.
2003-05-15 03:40:51 +00:00
Kurt B. Kaiser 7f38ec0849 1. Restore the capability to run and debug without a subprocess.
2. Add an indicator to the shell startup notice when running w/o
   subprocess.
3. Improve exception reporting when running a command or script from the
   command line.
4. Clarify the fact that breakpoints set or cleared after a file is
   saved will revert to the saved state if the file is closed without
   re-saving.
5. If user tries to exit or restart when user code is running, interrupt
   the user code.  This helps to eliminate occasional hanging
   subprocesses on Windows (except for Freddy :).

M NEWS.txt
M PyShell.py
M ScriptBinding.py
2003-05-15 03:19:42 +00:00
Kurt B. Kaiser aa6b856a42 On Windows the subprocess was not exiting during a restart.
This bug, henceforth designated Freddy, was due to the mistaken
elimination of the KeyboardInterrupt exception at the previous revision.
PyShell's unix_terminate hammer was masking the problem on Linux.  On W2K
the subprocess MainThread was trying to print the exception after the
SockThread had ceased to service the socket.  The subprocess would then
detach and spin when the GUI created the new subprocess.

Modified Files: run.py
2003-05-14 18:15:40 +00:00
Tony Lownds 2398d578a3 1. The command-line arguments for subprocesses no longer need to be
specialized for Mac OS X.

2. buildapp.py - a new file for building an application icon for IDLE on Mac
OS X. See INSTALL.txt
2003-05-13 15:28:21 +00:00
Kurt B. Kaiser 73414a2705 Update for SF 71033 and changes to subprocess threading 2003-05-12 03:04:59 +00:00
Kurt B. Kaiser 9ec454ec00 1. RemoteDebugger now runs user code in subprocess MainThread
2. run.py: move exception printing to toplevel to allow access from main()
3. Clarification in PyShell.py: when the subprocess is restarted, the
   debugger GUI is reused with a fresh instance of the subprocess
   debugger.

M PyShell.py
M RemoteDebugger.py
M run.py
2003-05-12 02:33:47 +00:00
Kurt B. Kaiser a053f33887 [ SF 710733 - Martin v. Loewis] Improving source encoding dialog
M IOBinding.py
M config-main.def
M configDialog.py
2003-05-10 00:49:56 +00:00
Kurt B. Kaiser 57bfe5dc5a 1. Update debugger to not trace RPC code even when calling Queue and
threading modules.  Can debug user code which imports these modules,
   though.
2. Re-enable debugger in PyShell.
3. Remove old code implementing previous approaches to this issue.

M Debugger.py
M PyShell.py
M rpc.py
2003-05-10 00:09:52 +00:00
Kurt B. Kaiser a00050f209 1. Implement processing of user code in subprocess MainThread. Pass loop
is now interruptable on Windows.
2. Tweak signal.signal() wait parameters as called by various methods
   to improve I/O response, especially on Windows.
3. Debugger is disabled at this check-in pending further development.

M NEWS.txt
M PyShell.py
M rpc.py
M run.py
2003-05-08 20:26:55 +00:00
Guido van Rossum c2f77dddf3 New feature: when saving a file, keep the eol convention of the
original.  New files are written using the eol convention of the
platform, given by os.linesep.  All files are read and written in
binary mode.
2003-04-25 18:36:31 +00:00
Kurt B. Kaiser 9a90e70b32 Update for release into Python
NEWS.txt idlever.py
2003-04-25 17:48:08 +00:00
Kurt B. Kaiser 40f19e3fd5 Update for 2.3b1
Modified Files:
	NEWS.txt CREDITS.txt INSTALL.txt setup.cfg
2003-04-25 16:37:31 +00:00
Kurt B. Kaiser 0529377cdf Correct error in last checkin noticed by Neal Norwitz. And some more. 2003-03-22 20:11:14 +00:00
Kurt B. Kaiser 11c53e2ea7 M PyShell.py
M run.py

1. Move subprocess socket handling to a subthread - "SockThread".
2. In the subprocess, implement a queue and global completion and exit
flags.  Execute code after it is passed through the queue.  (Currently,
user code is executed in SockThread.  The next phase of development will
move the tail of the queue to MainThread.)
3. Implement an RPC message used to shut down the execution server.
4. Improve normal and exception subprocess exits.

(At this checkin a "pass loop" interrupt doesn't work on any platform.  It
will be restored for all platforms once user code execution is moved to
MainThread.)
2003-03-22 19:40:19 +00:00
Kurt B. Kaiser e51529d79a Improve error message handling. 2003-03-22 19:15:58 +00:00
Kurt B. Kaiser 94afd3095e Move setting of ioready 'wait' earlier in call chain, to
rpc.SocketIO.main() and asyncreturn().  Improve comment.
2003-03-12 20:52:00 +00:00
Kurt B. Kaiser 7c22132069 M rpc.py
M run.py
1. Clarify that rpc.SocketIO._getresponse() currently blocks on socket.
2. Improve exception handling in subprocess when GUI terminates abruptly.
2003-03-11 22:55:56 +00:00
Kurt B. Kaiser 9ac783d723 M PyShell.py
M rpc.py
Improve exception handing if peer process has terminated.
2003-03-10 20:42:24 +00:00
Kurt B. Kaiser 98b15ab980 A interruptmodule.c
M setup.py
Implements an interrupt extension module which allows a subthread
to raise an interrupt in the main thread.
2003-03-10 20:41:07 +00:00
Kurt B. Kaiser ddeaf11d7e Attempting to save the shell raised an error related to saving
breakpoints, which are not implemented in the shell
2003-03-04 04:42:04 +00:00
Kurt B. Kaiser b2487335bf SF 693333
Modify subprocess to print a reasonable message upon receiving
a 'quit' or 'exit'
2003-03-04 04:03:45 +00:00
Kurt B. Kaiser b6aff15183 SF 695861
Eliminate extra blank line in shell output.  Caused by stdout not being
flushed
upon completion of subprocess' Executive.runcode() when user code ends by
outputting an unterminated line, e.g. print "test",
2003-03-03 20:06:48 +00:00
Kurt B. Kaiser 86bc464414 M rpc.py
M run.py

Move exception formatting out of rpc.py.  This allows each end of the
link to format and print exceptions how and where it sees fit and makes it
easier for threads to display their own exceptions.
2003-02-27 23:04:17 +00:00
Kurt B. Kaiser 003091cd51 M NEWS.txt
M PyShell.py
M ScriptBinding.py
M rpc.py
M run.py

Clean up the way IDLEfork handles termination of the subprocess, restore
ability to interrupt user code in Windows (so long as it's doing terminal
I/O).

1. Handle subprocess interrupts in Windows with an RPC message.
2. Run/F5 will restart the subprocess even if user code is running.
3. Restart the subprocess if the link is dropped.
4. Exit IDLE cleanly even during I/O.
4. In rpc.py, remove explicit calls to statelock, let the condition
   variable handle acquire() and release().
2003-02-17 18:57:16 +00:00
Kurt B. Kaiser 8cd0def10d M PyShell.py
M rpc.py

SF Bug 676398 Doesn't handle non-built-in exceptions
1. Move exception formatting to the subprocess; allows subclassing of
   exceptions, including subclasses created in the shell without
   introducing excessive complexity in the RPC mechanism.
2. Provide access to linecache from subprocess to support this.
2003-01-31 05:06:43 +00:00
Kurt B. Kaiser 7e17289868 Update for release.
Modified Files:
 	INSTALL.txt NEWS.txt idlever.py
2003-01-27 02:40:20 +00:00
Kurt B. Kaiser e66675b85c Whitespace normalization.
Modified Files:
 	Bindings.py configHandler.py configHelpSourceEdit.py
2003-01-27 02:36:18 +00:00
Kurt B. Kaiser d9db3a6713 Update. 2003-01-26 20:37:01 +00:00
Kurt B. Kaiser eb9637ef7d M ScriptBinding.py
M config-extensions.def
M help.txt

1. Run Script  -->  Run Module
2. Update IDLE Help file and do more work on format.
2003-01-26 04:17:16 +00:00
Kurt B. Kaiser bc2861313c M PyShell.py
M RemoteDebugger.py
M rpc.py

Fix the incorrect shell exception tracebacks generated when running
under debugger control:

1. Use rpc.SocketIO.asynccall() instead of remotecall() to handle the
   IdbProxy.run() command.
2. Add a 'shell' attribute to RemoteDebugger.IdbProxy to allow setting
   of ModifiedInterpreter's active_seq attribute from RemoteDebugger code.
3. Cleanup PyShell.ModifiedInterpreter.runcode() and remove ambiguity
   regarding use of begin/endexecuting().
4. In runcode() and cleanup_traceback() use 'console' instead of 'file' to
   denote the entity to which the exception traceback is printed.
5. Enhance cleanup_traceback() so if the traceback is pruned entirely away
   (the error is in IDLE internals) it will be displayed in its entirety
   instead.
6. ModifiedInterpreter.runcode() now prints ERROR RPC returns to both
   console and __stderr__.
7. Make a small tweak to the rpc.py debug messages.
2003-01-25 21:33:40 +00:00
Kurt B. Kaiser 0a0e6c3b5e 1. Eliminate putrequest(): only used in asynccall(), merge it there.
2. Add additional debugging statements and enhance others.
3. Clarify comments.
4. Move SocketIO.nextseq class attribute to beginning of class.
2003-01-25 03:26:35 +00:00
Kurt B. Kaiser 981344567f Make Alt-Key-2 the Zoom Height binding for ClassBrowser and PathBrowser,
consistent with the Edit/Shell windows.
2003-01-22 00:31:09 +00:00
Kurt B. Kaiser 4cc5ef5dbe M Bindings.py
M PyShell.py
M config-keys.def
M configHandler.py

1. Clear any un-entered characters from input line before printing the
   restart boundary.
2. Restore the Debug menu: There are now both Shell and Debug menus.
3. Add Control-F6 keybinding to Restart Shell.
4. Clarify PyShell.cancel_check() comment.
5. Update doc string for Bindings.py and re-format the file slightly.
2003-01-22 00:23:23 +00:00