summaryrefslogtreecommitdiffstats
path: root/Tools/idle/PyShell.py
Commit message (Collapse)AuthorAgeFilesLines
* Use string.ascii_letters instead of string.letters (SF bug #226706).Fred Drake2001-07-201-1/+4
| | | | | Move computation of sets of characters out of the body of the function that uses them.
* Amazing. A very subtle change in policy in descr-branch actuallyGuido van Rossum2001-07-061-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.
* Initialize new save_warnings_filters data member in ↵Tim Peters2001-03-291-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).
* Turn SyntasWarning into SyntaxError for all code enteredGuido van Rossum2001-03-261-1/+12
| | | | interactively.
* Whitespace normalization.Tim Peters2001-01-171-1/+1
|
* main(): Move hackery of sys.argv until after the Tk instance has beenFred Drake2000-09-151-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.
* Don't emit 8 lines of (c) information at startup -- use the same textGuido van Rossum2000-09-051-1/+4
| | | | as main.c.
* Override the Undo delegator to forbid any changes before the I/O mark.Guido van Rossum2000-03-071-0/+24
| | | | | It beeps if you try to insert or delete before the "iomark" mark. This makes the shell less confusing for newbies.
* rename the global IdleConfParser object from IdleConf to idleconfJeremy Hylton2000-03-071-2/+2
| | | | | | standard usage is now from IdleConf import idleconf replace : with = in config.txt
* If we're in the current input and there's only whitespace beyond theGuido van Rossum2000-03-071-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.
* migrate to use of IdleConf and config files to set optionsJeremy Hylton2000-03-031-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.
* Close debugger when closing. This may break a cycle.Guido van Rossum1999-06-251-0/+1
|
* Extend _close() to break cycles.Guido van Rossum1999-06-251-13/+18
| | | | Break some other cycles too (and destroy the root when done).
* Tim Peters again:Guido van Rossum1999-06-011-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.
* Rename History to IdleHistory.Guido van Rossum1999-05-211-1/+7
| | | | Add isatty() to pseudo files.
* Much improved autoindent and handling of tabs,Guido van Rossum1999-05-211-1/+1
| | | | by Tim Peters.
* Tim Peters strikes again:Guido van Rossum1999-04-261-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
* Nits: document use of $IDLESTARTUP; display idle versionGuido van Rossum1999-04-221-3/+5
|
* A lot of changes to make the command line more useful. You can now do:Guido van Rossum1999-04-221-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
* Color preferences code by Loren Luke (massaged by me somewhat)Guido van Rossum1999-04-201-6/+13
|
* At Tim Peters' recommendation, add a dummy flush() method to PseudoFile.Guido van Rossum1999-03-291-0/+3
|
* Add current dir or paths of file args to sys.path.Guido van Rossum1999-02-011-0/+7
|
* Move menu/key binding code from Bindings.py to EditorWindow.py,Guido van Rossum1999-01-281-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.
* Paul Prescod's patches to allow the stack viewer to pop up when aGuido van Rossum1999-01-081-0/+11
| | | | traceback is printed.
* Checking in IDLE 0.2.Guido van Rossum1999-01-021-166/+101
| | | | | | | | | | | | 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.
* Change our special entries from <console#N> to <pyshell#N>.Guido van Rossum1998-10-191-2/+48
| | | | | Patch linecache.checkcache() to keep our special entries alive. Add popup menu to all editor windows to set a breakpoint.
* Details for debugger interface.Guido van Rossum1998-10-161-3/+1
|
* Better debugger support (show stack etc).Guido van Rossum1998-10-161-3/+15
|
* Polish the Debugger GUI a bit.Guido van Rossum1998-10-141-8/+16
| | | | Closing it now also does the right thing.
* Ad primitive debugger interface (so far it will step and show you theGuido van Rossum1998-10-131-1/+37
| | | | source, but it doesn't yet show the stack).
* Clear the linecache before printing a tracebackGuido van Rossum1998-10-131-0/+7
|
* Make the return key do what I mean more often.Guido van Rossum1998-10-131-1/+1
|
* Make the return key do what I mean more often.Guido van Rossum1998-10-131-9/+11
|
* Subsume functionality from Popup menu in Debug menu.Guido van Rossum1998-10-121-7/+95
| | | | Other stuff so the PyShell window can be resurrected from the Windows menu.
* Initial checking of Tk-based Python IDE.Guido van Rossum1998-10-101-0/+475
Features: text editor with syntax coloring and undo; subclassed into interactive Python shell which adds history.