summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* Patch submitted by Toby Dickenson and approved by Mark Hammond.Guido van Rossum1999-06-211-2/+2
| | | | | | | | | | | | | | | | Toby writes: winmakemakefile.py tries to allow for spaces in the python install path, by adding quotes around the appropriate filenames. It doesn't quite get this correct; sometimes the quotes end up in the middle of the path. Microsoft's NMAKE version 6.0 is happy with this (!!!!) unless there is also a space in the name. I guess most users of freeze on windows do not use the same path as the binary distribution. I've tested the following changes on systems with and without a space in the path.
* Tim Peters smart.patch:Guido van Rossum1999-06-113-59/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EditorWindow.py: + Added get_tabwidth & set_tabwidth "virtual text" methods, that get/set the widget's view of what a tab means. + Moved TK_TABWIDTH_DEFAULT here from AutoIndent. + Renamed Mark's get_selection_index to get_selection_indices (sorry, Mark, but the name was plain wrong <wink>). FormatParagraph.py: renamed use of get_selection_index. AutoIndent.py: + Moved TK_TABWIDTH_DEFAULT to EditorWindow. + Rewrote set_indentation_params to use new VTW get/set_tabwidth methods. + Changed smart_backspace_event to delete whitespace back to closest preceding virtual tab stop or real character (note that this may require inserting characters if backspacing over a tab!). + Nuked almost references to the selection tag, in favor of using get_selection_indices. The sole exception is in set_region, for which no "set_selection" abstraction has yet been agreed upon. + Had too much fun using the spiffy new features of the format-paragraph cmd.
* Code by Mark Hammond to format paragraphs embedded in comments.Guido van Rossum1999-06-101-10/+55
| | | | | Read the comments (which I reformatted using the new feature :-) for some limitations.
* Added abstraction get_selection_index() (Mark Hammond). AlsoGuido van Rossum1999-06-101-14/+23
| | | | | reformatted some comment blocks to show off a cool feature I'm about to check in next.
* Adapt to the new pyclbr's support of listing top-level functions. IfGuido van Rossum1999-06-101-33/+34
| | | | | | | | this functionality is not present (e.g. when used with a vintage Python 1.5.2 installation) top-level functions are not listed. (Hmm... Any distribution of IDLE 0.5 should probably include a copy of the new pyclbr.py!)
* Fix off-by-one error in Tim's recent change to comment_region(): theGuido van Rossum1999-06-101-1/+1
| | | | | | list of lines returned by get_region() contains an empty line at the end representing the start of the next line, and this shouldn't be commented out!
* Mark Hammond writes: Here is another change that allows it to work forGuido van Rossum1999-06-101-14/+37
| | | | | class creation - tries to locate an __init__ function. Also updated the test code to reflect your new "***" change.
* Mark Hammond writes: Tim's suggestion of copying the font for theGuido van Rossum1999-06-101-1/+2
| | | | | CallTipWindow from the text control makes sense, and actually makes the control look better IMO.
* Append "..." if the appropriate flag (for varargs) in co_flags is set.Guido van Rossum1999-06-091-1/+3
| | | | Ditto "***" for kwargs.
* Hmm... Tim didn't turn "replace all" into a single undo block.Guido van Rossum1999-06-081-0/+2
| | | | I think I like it better if it os, so here.
* Tim Peters: made replacement atomic for undo/redo.Guido van Rossum1999-06-081-0/+2
|
* Tim Peters:Guido van Rossum1999-06-081-3/+2
| | | | | | | | | | | | | | | + Set usetabs=1. Editing pyclbr.py was driving me nuts <0.6 wink>. usetabs=1 is the Emacs pymode default too, and thanks to indentwidth != tabwidth magical usetabs disabling, new files are still created with tabs turned off. The only implication is that if you open a file whose first indent is a single tab, IDLE will now magically use tabs for that file (and set indentwidth to 8). Note that the whole scheme doesn't work right for PythonWin, though, since Windows users typically set tabwidth to 4; Mark probably has to hide the IDLE algorithm from them (which he already knows). + Changed comment_region_event to stick "##" in front of every line. The "holes" previously left on blank lines were visually confusing (made it needlessly hard to figure out what to uncomment later).
* Remove unnecessary reference to pyclbr from test() code.Guido van Rossum1999-06-072-5/+0
|
* Tim Peters:Guido van Rossum1999-06-071-19/+75
| | | | | | | | | | | | | | Smarter logic for finding a parse synch point. Does a half to a fifth the work in normal cases; don't notice the speedup, but makes more breathing room for other extensions. Speeds terrible cases by at least a factor of 10. "Terrible" == e.g. you put """ at the start of Tkinter.py, undo it, zoom to the bottom, and start typing in code. Used to take about 8 seconds for ENTER to respond, now some large fraction of a second. The new code gets indented correctly, despite that it all remains "string colored" until the colorizer catches up (after which, ENTER appears instantaneous again).
* Might as well enable CallTips by default.Guido van Rossum1999-06-041-0/+1
| | | | If there are too many complaints I'll remove it again or fix it.
* New offerings by Tim Peters; he writes:Guido van Rossum1999-06-033-26/+66
| | | | | | | | | | IDLE is now the first Python editor in the Universe not confused by my doctest.py <wink>. As threatened, this defines IDLE's is_char_in_string function as a method of EditorWindow. You just need to define one similarly in whatever it is you pass as editwin to AutoIndent; looking at the EditorWindow.py part of the patch should make this clear.
* Enclose pattern in quotes in status message.Guido van Rossum1999-06-031-1/+1
|
* Mark Hammond fixed some comments and improved the way the tip text isGuido van Rossum1999-06-031-11/+12
| | | | constructed.
* My fix to Mark's code: restore the universal check on <KeyRelease>.Guido van Rossum1999-06-021-14/+2
| | | | Always cancel on <Key-Escape> or <ButtonPress>.
* A version that Mark Hammond posted to the newsgroup. Has some newerGuido van Rossum1999-06-021-27/+38
| | | | | | stuff for getting the tip. Had to fix the Key-( and Key-) events for Unix. Will have to re-apply my patch for catching KeyRelease and ButtonRelease events.
* Call tips by Mark Hammond (plus tiny fix by me.)Guido van Rossum1999-06-022-0/+232
|
* Changes by Mark Hammond: (1) support optional output_sep argument toGuido van Rossum1999-06-021-6/+22
| | | | | the constructor so he can eliminate the sys.ps2 that PythonWin leaves in the source; (2) remove duplicate history items.
* Changes by Mark Hammond to allow using IDLE extensions in PythonWin asGuido van Rossum1999-06-021-9/+10
| | | | well: make three dialog routines instance variables.
* Change by Mark Hammond to allow using IDLE extensions in PythonWin asGuido van Rossum1999-06-021-0/+5
| | | | well: make three dialog routines instance variables.
* Hah! A fix of my own to Tim's code!Guido van Rossum1999-06-011-0/+2
| | | | | | | Unix bindings for <<toggle-tabs>> and <<change-indentwidth>> were missing, and somehow that meant the events were never generated, even though they were in the menu. The new Unix bindings are now the same as the Windows bindings (M-t and M-u).
* Tim Peters again:Guido van Rossum1999-06-013-107/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Tim Peters again:Guido van Rossum1999-06-011-166/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Tim, after adding some bracket smarts to AutoIndent.py] > ... > What it can't possibly do without reparsing large gobs of text is > suggest a reasonable indent level after you've *closed* a bracket > left open on some previous line. > ... The attached can, and actually fast enough to use -- most of the time. The code is tricky beyond belief to achieve that, but it works so far; e.g., return len(string.expandtabs(str[self.stmt_start : ^ indents to caret i], ^ indents to caret self.tabwidth)) + 1 ^ indents to caret It's about as smart as pymode now, wrt both bracket and backslash continuation rules. It does require reparsing large gobs of text, and if it happens to find something that looks like a "def" or "class" or sys.ps1 buried in a multiline string, but didn't suck up enough preceding text to see the start of the string, it's completely hosed. I can't repair that -- it's just too slow to reparse from the start of the file all the time. AutoIndent has grown a new num_context_lines tuple attribute that controls how far to look back, and-- like other params --this could/should be made user-overridable at startup and per-file on the fly.
* New file by Tim Peters:Guido van Rossum1999-06-011-0/+470
| | | | | | One new file in the attached, PyParse.py. The LineStudier (whatever it was called <wink>) class was removed from AutoIndent; PyParse subsumes its functionality.
* Tim Peters keeps revising this module (more to come):Guido van Rossum1999-06-011-86/+191
| | | | | | | | | | | | | Removed "New tabwidth" menu binding. Added "a tab means how many spaces?" dialog to block tabify and untabify. I think prompting for this is good now: they're usually at-most-once-per-file commands, and IDLE can't let them change tabwidth from the Tk default anymore, so IDLE can no longer presume to have any idea what a tab means. Irony: for the purpose of keeping comments aligned via tabs, Tk's non-default approach is much nicer than the Emacs/Notepad/Codewright/vi/etc approach.
* 1. Catch NameError on import (could be raised by case mismatch on Windows).Guido van Rossum1999-06-011-8/+2
| | | | | | | | 2. No longer need to reset pyclbr cache and show watch cursor when calling ClassBrowser -- the ClassBrowser takes care of pyclbr and the TreeWidget takes care of the watch cursor. 3. Reset the focus to the current window after error message about class browser on buffer without filename.
* Missed a few.Guido van Rossum1999-06-012-0/+0
|
* Rewritten based on TreeWidget.pyGuido van Rossum1999-06-012-265/+252
|
* Object browser, based on TreeWidget.py.Guido van Rossum1999-06-011-0/+154
|
* Tree widget done right.Guido van Rossum1999-06-011-0/+462
|
* As yet unused code for tool tips.Guido van Rossum1999-06-011-0/+87
|
* Ensure sys.argv[0] is the script name on Run Script.Guido van Rossum1999-06-011-0/+3
|
* Move zoom height functionality to separate function.Guido van Rossum1999-06-011-18/+21
|
* A few icons used by ../TreeWidget.py and its callers.Guido van Rossum1999-06-014-0/+0
|
* New version by Tim Peters improves block opening test.Guido van Rossum1999-06-011-2/+52
|
* Eugene Dvurechenski <jno@glas.net> says:Barry Warsaw1999-05-261-0/+1
| | | | | there is "su" top level domain still maintained in ex-USSR. at least "*.msk.su" zone (Moscow, USSR) is still in use.
* Rename History to IdleHistory.Guido van Rossum1999-05-212-74/+7
| | | | Add isatty() to pseudo files.
* Make initial stack viewer widerGuido van Rossum1999-05-211-1/+1
|
* New wishesGuido van Rossum1999-05-211-2/+7
|
* Much improved autoindent and handling of tabs,Guido van Rossum1999-05-213-65/+242
| | | | by Tim Peters.
* Tim Peters writes:Guido van Rossum1999-05-034-38/+123
| | | | | | | | | | | | I'm still unsure, but couldn't stand the virtual event trickery so tried a different sin (adding undo_block_start/stop methods to the Text instance in EditorWindow.py). Like it or not, it's efficient and works <wink>. Better idea? Give the attached a whirl. Even if you hate the implementation, I think you'll like the results. Think I caught all the "block edit" cmds, including Format Paragraph, plus subtler ones involving smart indents and backspacing.
* Tim Peters writes:Guido van Rossum1999-05-031-2/+2
| | | | | | | [W]hile trying to dope out how redirection works, stumbled into two possible glitches. In the first, it doesn't appear to make sense to try to rename a command that's already been destroyed; in the second, the name "previous" doesn't really bring to mind "ignore the previous value" <wink>.
* updates for latest releaseBarry Warsaw1999-05-011-7/+9
|
* Support for using idle as a package.Guido van Rossum1999-04-301-0/+1
|
* Avoid listing files more than once (e.g. foomodule.so has two hits:Guido van Rossum1999-04-301-1/+2
| | | | once for foo + module.so, once for foomodule + .so).
* Add a scale widget and command line options to set the output volume.Barry Warsaw1999-04-282-18/+65
| | | | Bump version number 1.0