summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
Commit message (Collapse)AuthorAgeFilesLines
* SF Bug 767794Kurt B. Kaiser2003-07-091-0/+2
| | | | "Break or continue outside loop causes crash"
* Idlefork patch #682347: convert Unicode strings from readline toMartin v. Löwis2003-06-221-4/+12
| | | | | IOBinding.encoding. Also set sys.std{in,out,err}.encoding, for both the local and the subprocess case.
* Support testing in .../Lib/idlelib when calling <python PyShell.py>Kurt B. Kaiser2003-06-151-0/+1
| | | | by providing other modules access to globals set up in PyShell.main()
* Remove the 2.2 compatibility module boolcheck.py and related codeKurt B. Kaiser2003-06-141-3/+0
| | | | | | M PyShell.py R boolcheck.py M run.py
* Remove reference to IDLEforkKurt B. Kaiser2003-06-141-1/+1
|
* Avoid problem resolving 'localhost'Kurt B. Kaiser2003-06-051-1/+2
| | | | | | M PyShell.py M rpc.py M run.py
* Modify the remote stack viewer to work in the threaded subprocess.Kurt B. Kaiser2003-06-021-0/+14
| | | | | M PyShell.py M run.py
* Added a config-main General option to delete sys.exitfunc. The defaultKurt B. Kaiser2003-05-281-3/+6
| | | | | | | | is not to do that. VPython and student environment support. M PyShell.py M config-main.def M run.py
* Whitespace NormalizationKurt B. Kaiser2003-05-261-1/+1
| | | | Modified Files: PyShell.py ScriptBinding.py buildapp.py
* Improved the RESTART annotation in the shell window when the userKurt B. Kaiser2003-05-241-0/+9
| | | | | restarts the shell while it is generating output. Also improved annotation when user repeatedly hammers the Ctrl-F6 restart.
* 1. Stake Freddy.Kurt B. Kaiser2003-05-241-23/+22
| | | | | | | | | | | | | 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
* Fix race exposed by 2.4 GHz XP box: Don't tear down PyShell untilKurt B. Kaiser2003-05-191-5/+11
| | | | | | | subprocess polling has terminated. Tk callit gets unhappy if it can't find the function 'after' scheduled to run. M PyShell.py
* 1. When a module is run from an EditorWindow, if its directory is not inKurt B. Kaiser2003-05-151-3/+16
| | | | | | | | | | | | | | 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
* 1. Add a command line switch to run without the subprocessKurt B. Kaiser2003-05-151-18/+20
| | | | | | | | | | 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
* 1. Make the startup more robust by not spawning the subprocess if IDLEKurt B. Kaiser2003-05-151-6/+3
| | | | | can't acquire the port to listen on. 2. Shorten the retry and simplify the messages.
* 1. Restore the capability to run and debug without a subprocess.Kurt B. Kaiser2003-05-151-51/+68
| | | | | | | | | | | | | | | | | 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
* 1. The command-line arguments for subprocesses no longer need to beTony Lownds2003-05-131-22/+8
| | | | | | | 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
* 1. RemoteDebugger now runs user code in subprocess MainThreadKurt B. Kaiser2003-05-121-0/+2
| | | | | | | | | | | 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
* 1. Update debugger to not trace RPC code even when calling Queue andKurt B. Kaiser2003-05-101-1/+1
| | | | | | | | | | | 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
* 1. Implement processing of user code in subprocess MainThread. Pass loopKurt B. Kaiser2003-05-081-81/+37
| | | | | | | | | | | | 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
* M PyShell.pyKurt B. Kaiser2003-03-221-10/+23
| | | | | | | | | | | | | | | | 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.)
* M PyShell.pyKurt B. Kaiser2003-03-101-1/+4
| | | | | M rpc.py Improve exception handing if peer process has terminated.
* SF 693333Kurt B. Kaiser2003-03-041-0/+3
| | | | | Modify subprocess to print a reasonable message upon receiving a 'quit' or 'exit'
* M NEWS.txtKurt B. Kaiser2003-02-171-34/+75
| | | | | | | | | | | | | | | | | | 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().
* M PyShell.pyKurt B. Kaiser2003-01-311-47/+1
| | | | | | | | | | 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.
* M PyShell.pyKurt B. Kaiser2003-01-251-33/+35
| | | | | | | | | | | | | | | | | | | | | | | 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.
* M Bindings.pyKurt B. Kaiser2003-01-221-2/+4
| | | | | | | | | | | | | 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.
* M AutoExpand.pyKurt B. Kaiser2003-01-041-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | M Bindings.py M EditorWindow.py M PyShell.py M config-keys.def M configHandler.py M help.txt 1. Annotate the shell window with last restart boundary upon restart. 2. Provide a shell menu entry and hot key (F6) to jump to the last restart boundary. 3. Add a new shell menu feature to restart the shell. 4. Update the help menu to add these features. 5. Update the help menu to put text in same order as the menus. 6. Correct a capitalization inconsistency on the Edit menu: Expand Word 7. Rename the "Debug" menu to be "Shell": it's doing more now. 8. Rearrange the "Shell" menu to make the StackViewer entries adjacent. 9. Add a get_geometry method to EditorWindow, which may be of use in making window positions persisent. 10. Make <ctrl-v> the "Classic Windows" paste key. 11. Restore decorum on the Help menu by removing "Advice". As Guido said, things will never be the same. Thanks, David!
* Whitespace NormalizationKurt B. Kaiser2002-12-311-17/+17
|
* M EditorWindow.pyKurt B. Kaiser2002-12-291-9/+12
| | | | | | | | | | | | | | | M PyShell.py 1. PyShell Rev 1.39, EditorWindow Rev 1.37 fix was not handling a multiline prompt. 2. The same fix introduced a bug where hitting <enter> at a previous prompt-only line would copy the prompt to the iomark. 3. Move the setting of sys.ps1 earlier, into PyShell.main(), to allow this code to work before a shell is started up. 4. If cursor is on the input line in the prompt, and you hit <enter>, process the line instead of complaining. 5. If line has no stdin range (this includes the last line before shell restart) strip any prompt before recalling.
* Move boolcheck before import of other IDLE modulesTony Lownds2002-12-241-3/+3
|
* M PyShell.pyKurt B. Kaiser2002-12-241-3/+9
| | | | | | | | | | | | | | | | M idle M idle.py M idle.pyw M setup.py Switch back to installing IDLE as a package. The IDLE GUI and the subprocess will both attempt to start up via the package mechanism, but if IDLE is not yet installed it is possible to run by calling python idle.py in the IDLE source directory, or to add the source directory to sys.path. One advantage of doing it this way is IDLE stays off sys.path. Developed in collaboration with Tony Lownds.
* IDLE should exit if it fails to connect with the execution serverKurt B. Kaiser2002-12-241-1/+1
| | | | subprocess. Currently it opens a dead shell window.
* 1. RPC stack levels were not pruned from traceback unless IDLE was startedKurt B. Kaiser2002-12-241-12/+27
| | | | | | from its source directory. 2. Replace final traceback '?' with '-toplevel-' 3. Remove duplicated import boolcheck
* Move boolcheck to PyShellTony Lownds2002-12-231-0/+2
|
* M MANIFEST.inKurt B. Kaiser2002-12-231-1/+1
| | | | | | | | | | | | | | | M PyShell.py M idlever.py M setup.py 1. Update MANIFEST.in to include all non-pure Python files 2. PyShell and idlever reflect Rev 0.9a0 3. setup.py modified to install IDLE as a collection of modules with a .pth file living at the idlelib level in site-packages. This was done to make it easier to run from the source directory prior to installing IDLE. This approach may change back to the package technique depending on what happens with the Mac installation development.
* When IDLE is installed and run from a startup script, the script'sKurt B. Kaiser2002-12-211-0/+5
| | | | | | | | directory becomes sys.path[0]. What is wanted is the directory from which IDLE was called. Insert the current working directory in the path if it isn't there already.
* M PyShell.pyKurt B. Kaiser2002-12-211-0/+2
| | | | | | | | | | | | | M idle M setup.py To be able to run from the source directory or from an installed version of IDLE, and also to allow the subprocess to find run(), Python needs to have the idlelib package on its path. 1. Modify setup.py to supply a .pth file living at same level as idlelib 2. Move boolcheck to PyShell.py 3. Remove boolcheck and path setting code from the "idle" script
* Update way a subprocess is launched for Mac OS X.Tony Lownds2002-12-201-14/+18
| | | | | | | | | | Another applet mechanism has been developed for Python on Mac OS X and trying to use the -c "__import__('run').main()" trick is just not working. macosx_main.py is a new file which should be used as the startup file for Mac OS X applet bundles. This startup file understands a -p option, which when seen will start run.main(). When running as an applet, this seems like the best approach.
* M ColorDelegator.pyKurt B. Kaiser2002-12-171-1/+0
| | | | | | | | | | | | | M PyShell.py M ScriptBinding.py 1. Update ScriptBinding.py to highlight a syntax error in the Edit window, and place the cursor on the error. Add a syntax check to the Run Script event instead of waiting until the script tries to run and raises a syntax error in the shell, forcing the user to navigate back to the Edit window to fix it. 2. Modify tag_config's appropriately in PyShell.py and ColorDelegator.py 3. Some minor clean-up in ScriptBinding.py
* M EditorWindow.pyKurt B. Kaiser2002-12-161-3/+8
| | | | | | | | | | M PyShell.py Idlefork SF Bug 440383 - IDLE goes into beep loop Fix loop in EditorWindow.newline_and_indent_event() and in addition fix submission of >>> prompt to PyParse.Parser Eliminate extra attribute EditorWindow.auto_indent
* M Debugger.pyKurt B. Kaiser2002-12-141-33/+63
| | | | | | | | | | | | | | | | | | | | | | | M IOBinding.py M PyShell.py * Could not remove last set of saved breakpoints from a file * Starting with empty edit window, could not load a file * Multiple adjacent breakpoints were saved as one breakpoint * Storing breakpoints whenever a file is closed can get them out of synch with the saved version of a file. Only store them when the file is saved. * Add comment on current limitations on file editing in the presence of breakpoints. * Replace get_current_breaks() with update_breakpoints(), add an update to PyShellEditorWindow.breakpoints, which is the master breakpoint data structure, and which is used to reload the subprocess debugger. * Revert Debugger.Debugger.load_breakpoints() to use editwin.breakpoints. It is easier to debug the debugger if the breakpoint list in IDLE is identical to the list in the subprocess debugger and is transferred when the subprocess debugger is restarted, because this list can be easily queried. * Cleanup some linespacing and comments in IOBinding.py
* Rework the command line interface, incorporating the shell/editKurt B. Kaiser2002-12-111-72/+136
| | | | | | configuration selection. Rework the usage message to match. Also some minor code polishing.
* M PyShell.pyKurt B. Kaiser2002-12-061-5/+19
| | | | | | | | | | | | | 1. Format and print exceptions raised in user code. M rpc.py 1. Additional debug messages in rpc.py 2. Move debug message enable switch from SocketIO to Client and Server to allow separate activation. 3. Add indication of origin (client or server) to debug message 4. Add sequence number to appropriate debug messages 5. Pass string exception arg as a string rather than a tuple.
* Add missing self for method callNeal Norwitz2002-11-301-2/+2
|
* M PyShell.pyKurt B. Kaiser2002-11-301-16/+18
| | | | | | M rpc.py SF Bug 629987: Idle not printing prompts following SyntaxError
* Correct an error introduced at Rev 1.30. The keyword arg is necessaryKurt B. Kaiser2002-11-291-6/+8
| | | | to freeze the value of orig_checkcache. Otherwise infinite recursion.
* Set breakpoints on remote debuggerChui Tey2002-11-041-8/+9
|
* Recalls breakpoints set in a fileChui Tey2002-11-041-7/+57
|
* Implement Restoring Breakpoints in Subprocess DebuggerKurt B. Kaiser2002-10-231-34/+96
| | | | | | | | | | | | | | | | | | | | M Debugger.py M EditorWindow.py M PyShell.py 0. Polish PyShell.linecache_checkcache() 1. Move break clearing code to PyShell.PyShellEditorWindow from EditorWindow. 2. Add PyShellEditorWindow.breakpoints attribute to __init__, a list of line numbers which are breakpoints for that edit window. 3. Remove the code in Debugger which removes all module breakpoints when debugger is closed. Want to be able to reload into debugger when restarted. 4. Moved the code which sets EditorWindow.text breakpoints from Debugger to PyShell.PyShellEditorWindow and refactored. 5. Implement reloading subprocess debugger with breakpoints from all open PyShellEditorWindows when debugger is opened or subprocess restarted. 6. Eliminate the break_set attribute, use the breakpoint list instead.