summaryrefslogtreecommitdiff
path: root/Tools/idle/PyShell.py
AgeCommit message (Collapse)AuthorLines
2002-09-23Backport patch 543222. Disable script bindings in shell window.Raymond Hettinger-0/+1
2001-07-20Use string.ascii_letters instead of string.letters (SF bug #226706).Fred Drake-1/+4
Move computation of sets of characters out of the body of the function that uses them.
2001-07-06Amazing. A very subtle change in policy in descr-branch actuallyGuido van Rossum-1/+1
found a bug here. Here's the deal: Class PyShell derives from class OutputWindow. Method PyShell.close() wants to invoke its parent method, but because PyShell long ago was inherited from class PyShellEditorWindow, it invokes PyShelEditorWindow.close(self). Now, class PyShellEditorWindow itself derives from class OutputWindow, and inherits the close() method from there without overriding it. Under the old rules, PyShellEditorWindow.close would return an unbound method restricted to the class that defined the implementation of close(), which was OutputWindow.close. Under the new rules, the unbound method is restricted to the class whose method was requested, that is PyShellEditorWindow, and this was correctly trapped as an error.
2001-03-29Initialize new save_warnings_filters data member in ↵Tim Peters-0/+1
ModifiedInterpreter.__init__. Was getting mystery ModifiedInterpreter instance has no attribute 'save_warnings_filters' errors at odd times (for sure in a fresh IDLE, fresh file, then Run Script).
2001-03-26Turn SyntasWarning into SyntaxError for all code enteredGuido van Rossum-1/+12
interactively.
2001-01-17Whitespace normalization.Tim Peters-1/+1
2000-09-15main(): Move hackery of sys.argv until after the Tk instance has beenFred Drake-7/+7
created. This allows the application-specific Tkinter initialization to be executed if present. Also pass an explicit className parameter to the Tk() constructor. This closes SourceForge bug #110618.
2000-09-05Don't emit 8 lines of (c) information at startup -- use the same textGuido van Rossum-1/+4
as main.c.
2000-03-07Override the Undo delegator to forbid any changes before the I/O mark.Guido van Rossum-0/+24
It beeps if you try to insert or delete before the "iomark" mark. This makes the shell less confusing for newbies.
2000-03-07rename the global IdleConfParser object from IdleConf to idleconfJeremy Hylton-2/+2
standard usage is now from IdleConf import idleconf replace : with = in config.txt
2000-03-07If we're in the current input and there's only whitespace beyond theGuido van Rossum-0/+5
cursor, erase that whitespace first. This avoids a particularly confusing case where hitting Return at the end of the command didn't do what it was expected to do -- because it wasn't considered to be at the end of the command. Now it is.
2000-03-03migrate to use of IdleConf and config files to set optionsJeremy Hylton-13/+8
idle.py: Load the config files before anything else happens XXX Need to define standard way to get files relative to the IDLE install dir PyShell.py: ColorDelegator.py: Get color defns out of IdleConf instead of IdlePrefs EditorWindow.py: Replace hard-coded font & window size with config options Get extension names via IdleConf.getextensions extend.py: Obsolete. Extensions defined in config file. ParenMatch.py: Use config file for extension options. Revise comment about parser requirements. Simplify logic on find returning None.
1999-06-25Close debugger when closing. This may break a cycle.Guido van Rossum-0/+1
1999-06-25Extend _close() to break cycles.Guido van Rossum-13/+18
Break some other cycles too (and destroy the root when done).
1999-06-01Tim Peters again:Guido van Rossum-1/+1
The new version (attached) is fast enough all the time in every real module I have <whew!>. You can make it slow by, e.g., creating an open list with 5,000 90-character identifiers (+ trailing comma) each on its own line, then adding an item to the end -- but that still consumes less than a second on my P5-166. Response time in real code appears instantaneous. Fixed some bugs. New feature: when hitting ENTER and the cursor is beyond the line's leading indentation, whitespace is removed on both sides of the cursor; before whitespace was removed only on the left; e.g., assuming the cursor is between the comma and the space: def something(arg1, arg2): ^ cursor to the left of here, and hit ENTER arg2): # new line used to end up here arg2): # but now lines up the way you expect New hack: AutoIndent has grown a context_use_ps1 Boolean config option, defaulting to 0 (false) and set to 1 (only) by PyShell. Reason: handling the fancy stuff requires looking backward for a parsing synch point; ps1 lines are the only sensible thing to look for in a shell window, but are a bad thing to look for in a file window (ps1 lines show up in my module docstrings often). PythonWin's shell should set this true too. Persistent problem: strings containing def/class can still screw things up completely. No improvement. Simplest workaround is on the user's head, and consists of inserting e.g. def _(): pass (or any other def/class) after the end of the multiline string that's screwing them up. This is especially irksome because IDLE's syntax coloring is *not* confused, so when this happens the colors don't match the indentation behavior they see.
1999-05-21Rename History to IdleHistory.Guido van Rossum-1/+7
Add isatty() to pseudo files.
1999-05-21Much improved autoindent and handling of tabs,Guido van Rossum-1/+1
by Tim Peters.
1999-04-26Tim Peters strikes again:Guido van Rossum-1/+1
Ho ho ho -- that's trickier than it sounded! The colorizer is working with "line.col" strings instead of Text marks, and the absolute coordinates of the point of interest can change across the self.update call (voice of baffled experience, when two quick backspaces no longer fooled it, but a backspace followed by a quick ENTER did <wink>). Anyway, the attached appears to do the trick. CPU usage goes way up when typing quickly into a long triple-quoted string, but the latency is fine for me (a relatively fast typist on a relatively slow machine). Most of the changes here are left over from reducing the # of vrbl names to help me reason about the logic better; I hope the code is a *little* easier to
1999-04-22Nits: document use of $IDLESTARTUP; display idle versionGuido van Rossum-3/+5
1999-04-22A lot of changes to make the command line more useful. You can now do:Guido van Rossum-26/+115
idle.py -e file ... -- to edit files idle.py script arg ... -- to run a script idle.py -c cmd arg ... -- to run a command Other options, see also the usage message (also new!) for more details: -d -- enable debugger -s -- run $IDLESTARTUP or $PYTHONSTARTUP -t title -- set Python Shell window's title sys.argv is set accordingly, unless -e is used. sys.path is absolutized, and all relevant paths are inserted into it. Other changes: - the environment in which commands are executed is now the __main__ module - explicitly save sys.stdout etc., don't restore from sys.__stdout__ - new interpreter methods execsource(), execfile(), stuffsource() - a few small nits
1999-04-20Color preferences code by Loren Luke (massaged by me somewhat)Guido van Rossum-6/+13
1999-03-29At Tim Peters' recommendation, add a dummy flush() method to PseudoFile.Guido van Rossum-0/+3
1999-02-01Add current dir or paths of file args to sys.path.Guido van Rossum-0/+7
1999-01-28Move menu/key binding code from Bindings.py to EditorWindow.py,Guido van Rossum-12/+17
with changed APIs -- it makes much more sense there. Also add a new feature: if the first character of a menu label is a '!', it gets a checkbox. Checkboxes are bound to Boolean Tcl variables that can be accessed through the new getvar/setvar/getrawvar API; the variable is named after the event to which the menu is bound.
1999-01-08Paul Prescod's patches to allow the stack viewer to pop up when aGuido van Rossum-0/+11
traceback is printed.
1999-01-02Checking in IDLE 0.2.Guido van Rossum-165/+100
Much has changed -- too much, in fact, to write down. The big news is that there's a standard way to write IDLE extensions; see extend.txt. Some sample extensions have been provided, and some existing code has been converted to extensions. Probably the biggest new user feature is a new search dialog with more options, search and replace, and even search in files (grep). This is exactly as downloaded from my laptop after returning from the holidays -- it hasn't even been tested on Unix yet.
1998-10-19Change our special entries from <console#N> to <pyshell#N>.Guido van Rossum-2/+48
Patch linecache.checkcache() to keep our special entries alive. Add popup menu to all editor windows to set a breakpoint.
1998-10-16Details for debugger interface.Guido van Rossum-3/+1
1998-10-16Better debugger support (show stack etc).Guido van Rossum-3/+15
1998-10-14Polish the Debugger GUI a bit.Guido van Rossum-8/+16
Closing it now also does the right thing.
1998-10-13Ad primitive debugger interface (so far it will step and show you theGuido van Rossum-1/+37
source, but it doesn't yet show the stack).
1998-10-13Clear the linecache before printing a tracebackGuido van Rossum-0/+7
1998-10-13Make the return key do what I mean more often.Guido van Rossum-1/+1
1998-10-13Make the return key do what I mean more often.Guido van Rossum-9/+11
1998-10-12Subsume functionality from Popup menu in Debug menu.Guido van Rossum-7/+95
Other stuff so the PyShell window can be resurrected from the Windows menu.
1998-10-10Initial checking of Tk-based Python IDE.Guido van Rossum-0/+475
Features: text editor with syntax coloring and undo; subclassed into interactive Python shell which adds history.