summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Skip Montanaro:Guido van Rossum1999-06-081-2/+13
| | | | | | | | | I guess in 1.5.2 a new module, whichdb, was added that attempts to divine the nature of a database file. This module doesn't know anything about Berkeley DB v2 files. In v2, Sleepycat added a 12-byte null pad in front of the old magic numbers (at least for hash and btree files). I've been using v2 for awhile and upgrading to 1.5.2 broke all my anydbm.open calls. I believe the following patch corrects the problem.
* 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).
* Tim Peters: Taught it more "real Python" rules without slowing itGuido van Rossum1999-06-081-47/+53
| | | | | | | | | | appreciably. Triple-quoted strings no longer confuse it, nor nested classes or defs, nor comments starting in column 1. Chews thru Tkinter.py in < 3 seconds for me; doctest.py no longer confuses it; no longer missing methods in PyShell.py; etc. Also captures defs starting in column 1 now, but ignores them; an interface should be added so that IDLE's class browser can show the top-level functions too.
* Hacked 'set_final_options()' to set (hopefully) appropriate values forGreg Ward1999-06-081-7/+56
| | | | | | | 'install_site_lib' and install_site_platlib' on non-POSIX platforms. Should at least work for NT, as this is adopted from Amos Latteier's NT patches. Also added extensive comments bitching about the inadequacy of the current model, both under POSIX and NT (and probably other) systems.
* Added the 'have_run' dictionary to Distribution, and changedGreg Ward1999-06-081-3/+33
| | | | | | | 'run_command()' to refer to it before attempting to run a command -- that way, command classes can freely invoke other commands without fear of duplicate execution. Beefed up some comments and docstrings.
* Now handles NT, through '_init_nt()' function (courtesy ofGreg Ward1999-06-081-0/+11
| | | | Amos Latteier <amos@aracnet.com>).
* Remove unnecessary reference to pyclbr from test() code.Guido van Rossum1999-06-072-5/+0
|
* Experimental speedup patch by Tim Peters (please test!):Guido van Rossum1999-06-071-82/+149
| | | | | | | | | It wasn't hard to speed pyclbr by a factor of 3, and I'll attach an experimental patch for that (experimental because barely tested). Uncomment the new "String" stuff and it will deal with strings correctly (pyclbr currently ignores the possibility), but that slows it down a lot. Still faster in the end than current pyclbr, but-- frankly --I'd rather have the dramatic speedup!
* Fix bug discovered by John W. Shipman -- when the width of a formatGuido van Rossum1999-06-071-2/+4
| | | | | | | | specifier came from an int expression instead of a constant in the format, a negative width was truncated to zero instead of taken to mean the same as that negative constant plugged into the format. E.g. "(%*s)" % (-5, "foo") yielded "(foo)" while "(%-5s)" yields "(foo )". Now both yield the latter -- like sprintf() in C.
* 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.
* Patch by Jim Fulton: new function parse_qsl(), which is likeGuido van Rossum1999-06-041-13/+44
| | | | | parse_qs() but returns a list of (name, value) pairs -- which is actually more correct. Use this where it makes sense.
* Added an "optional" directive, that will include a module if it is availableJack Jansen1999-06-042-3/+6
| | | | but not complain if it isn't (giving an ImportError when the frozen code is run).
* (py-statement-closes-block-p): py-goto-initial-line could leave us inBarry Warsaw1999-06-031-2/+2
| | | | the line's whitespace. back-to-indentation should /follow/ this call.
* 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.
* At Jim Fulton's request (actually, as a compromise :-), default theGuido van Rossum1999-06-021-2/+2
| | | | | | content-type to application/x-www-form-urlencoded only when the method is POST. Ditto for when the content-type is unrecognized -- only fall back to urlencoded with POST.
* 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.
* Andy Dustman notes that I patched the close() call in the wrong place.Guido van Rossum1999-06-011-1/+1
| | | | Here's the correct patch!
* In class TemporaryFileWrapper, don't cache attributes of tpye int --Guido van Rossum1999-06-011-1/+2
| | | | | | these happen to be 'closed' and 'softspace', which may change! Noted by Dave Ascher (with slightly different solution).
* 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
|
* Fix availability clause; mention availability of similar functionalityFred Drake1999-06-011-2/+5
| | | | for Windows using win32pipe.
* 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
|
* Jack Jansen's patch to support file:///path/file/name URL syntax.Guido van Rossum1999-06-011-0/+5
|
* Greg McFarlane writes: Tkinter.Text.tag_add should take multipleGuido van Rossum1999-06-011-2/+2
| | | | arguments. [Slightly changed from submitted patch.]
* posix_listdir(): When an error occurs, callBarry Warsaw1999-05-271-5/+5
| | | | | | posix_error_with_filename() instead of posix_error(), passing in the name argument, so you get information on which directory was being listed.
* Oops, forgot to remove the individual module indexes for lib & mac nowFred Drake1999-05-271-3/+1
| | | | that there's a Global Module Index; there can be only one!
* Add <hr> after top navigation bar; now looks more like the rest of theFred Drake1999-05-271-0/+1
| | | | navigation bars in the HTML output.
* Hack: make sure LaTeX2HTML doesn't change -- to - in mkhowtoFred Drake1999-05-271-2/+2
| | | | description.