]> granicus.if.org Git - python/log
python
25 years agoNew version from Jim: don't call Py_FatalError() when initialization fails.
Guido van Rossum [Tue, 15 Jun 1999 14:35:48 +0000 (14:35 +0000)]
New version from Jim: don't call Py_FatalError() when initialization fails.

25 years agoAdded entries for new sections from Moshe.
Fred Drake [Mon, 14 Jun 1999 19:52:10 +0000 (19:52 +0000)]
Added entries for new sections from Moshe.

25 years agoMisc. changes related to the new sections.
Fred Drake [Mon, 14 Jun 1999 19:49:50 +0000 (19:49 +0000)]
Misc. changes related to the new sections.

25 years agoNew sections from Moshe Zadka <moshez@math.huji.ac.il>.
Fred Drake [Mon, 14 Jun 1999 19:47:47 +0000 (19:47 +0000)]
New sections from Moshe Zadka <moshez@math.huji.ac.il>.
These document CGIHTTPServer, SimpleHTTPServer, and linecache.

25 years agoAdded more tests of join
Barry Warsaw [Mon, 14 Jun 1999 18:38:42 +0000 (18:38 +0000)]
Added more tests of join

25 years agoMessage.getheaders(): If there are no matching headers, return an
Fred Drake [Mon, 14 Jun 1999 15:40:23 +0000 (15:40 +0000)]
Message.getheaders():  If there are no matching headers, return an
       empty list instead of None.  (Guido's request.)

25 years agoAdd entry for the fpformat module.
Fred Drake [Fri, 11 Jun 1999 18:36:42 +0000 (18:36 +0000)]
Add entry for the fpformat module.

25 years agoDocumentation for the fpformat module by Moshe Zadka
Fred Drake [Fri, 11 Jun 1999 18:31:00 +0000 (18:31 +0000)]
Documentation for the fpformat module by Moshe Zadka
<mzadka@geocities.com>.

25 years agoAdded 'ce' to the list of "registered" values for os.name.
Fred Drake [Fri, 11 Jun 1999 18:28:37 +0000 (18:28 +0000)]
Added 'ce' to the list of "registered" values for os.name.

Make references to the posix module hyperlinks.

25 years agoAfter more discussion with Jim, change the behavior so that only a
Guido van Rossum [Fri, 11 Jun 1999 18:26:09 +0000 (18:26 +0000)]
After more discussion with Jim, change the behavior so that only a
*missing* content-type at the outer level of a POST defaults to
urlencoded.  In all other circumstances, the default is read_singe().

25 years agoTwo extra startswith tests
Barry Warsaw [Fri, 11 Jun 1999 17:51:13 +0000 (17:51 +0000)]
Two extra startswith tests

25 years agoHarness can now test object methods directly, if they aren't available
Barry Warsaw [Fri, 11 Jun 1999 17:48:07 +0000 (17:48 +0000)]
Harness can now test object methods directly, if they aren't available
in the string module.

Add a bunch of new tests for extended startswith/endswith arguments.

25 years agoTim Peters smart.patch:
Guido van Rossum [Fri, 11 Jun 1999 15:03:00 +0000 (15:03 +0000)]
Tim Peters smart.patch:

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.

25 years agoLast night's scribbles:
Fred Drake [Fri, 11 Jun 1999 14:25:45 +0000 (14:25 +0000)]
Last night's scribbles:

- Revise abstract based on Guido's comments from way back.
- Point out that LaTeX is a structured system & we're using it that
  way.
- Add a small section on marking up code examples.

25 years agoMark Hammond: patch for Windows/CE.
Guido van Rossum [Fri, 11 Jun 1999 01:37:27 +0000 (01:37 +0000)]
Mark Hammond: patch for Windows/CE.

25 years agoOutput for the regression test of the new string methods.
Barry Warsaw [Thu, 10 Jun 1999 22:53:23 +0000 (22:53 +0000)]
Output for the regression test of the new string methods.

25 years agoRegression test for the new string methods.
Barry Warsaw [Thu, 10 Jun 1999 22:53:10 +0000 (22:53 +0000)]
Regression test for the new string methods.

25 years agoSome clarifications on operations for mapping types, based on comments
Fred Drake [Thu, 10 Jun 1999 22:37:34 +0000 (22:37 +0000)]
Some clarifications on operations for mapping types, based on comments
from Gerry Weiner <gerry@ucar.edu>.

25 years agoAdjust indexing for __import__(); based on comments by Stefan Franke
Fred Drake [Thu, 10 Jun 1999 22:09:20 +0000 (22:09 +0000)]
Adjust indexing for __import__(); based on comments by Stefan Franke
<sfranke@cdc-group.com>.

25 years agoImprove index entry for "import"; responding to comments by Stefan
Fred Drake [Thu, 10 Jun 1999 22:08:16 +0000 (22:08 +0000)]
Improve index entry for "import"; responding to comments by Stefan
Franke <sfranke@cdc-group.com>.

25 years agoWork around latex2html problem; reported by Gerrit Holl
Fred Drake [Thu, 10 Jun 1999 21:23:31 +0000 (21:23 +0000)]
Work around latex2html problem; reported by Gerrit Holl
<gerrit.holl@pobox.com>.

25 years agoRelocating file to Lib/lib-old.
Fred Drake [Thu, 10 Jun 1999 21:18:02 +0000 (21:18 +0000)]
Relocating file to Lib/lib-old.

25 years agoDeclare the "util" module obsolete.
Fred Drake [Thu, 10 Jun 1999 21:17:11 +0000 (21:17 +0000)]
Declare the "util" module obsolete.

25 years agoAdded a few more bugs to the doc string; reformatted existing bugs.
Guido van Rossum [Thu, 10 Jun 1999 19:05:54 +0000 (19:05 +0000)]
Added a few more bugs to the doc string; reformatted existing bugs.

25 years agoCode by Mark Hammond to format paragraphs embedded in comments.
Guido van Rossum [Thu, 10 Jun 1999 17:48:02 +0000 (17:48 +0000)]
Code by Mark Hammond to format paragraphs embedded in comments.
Read the comments (which I reformatted using the new feature :-)
for some limitations.

25 years agoAdded abstraction get_selection_index() (Mark Hammond). Also
Guido van Rossum [Thu, 10 Jun 1999 17:43:17 +0000 (17:43 +0000)]
Added abstraction get_selection_index() (Mark Hammond).  Also
reformatted some comment blocks to show off a cool feature I'm about
to check in next.

25 years agoFixed typo reported by Bennett Benson
Fred Drake [Thu, 10 Jun 1999 15:30:21 +0000 (15:30 +0000)]
Fixed typo reported by Bennett Benson
<BennettBenson@mn.mediaone.net>.

25 years agoAdapt to the new pyclbr's support of listing top-level functions. If
Guido van Rossum [Thu, 10 Jun 1999 15:19:14 +0000 (15:19 +0000)]
Adapt to the new pyclbr's support of listing top-level functions.  If
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!)

25 years agoAt David Ascher's request, clarify that os.system() always returns 0
Fred Drake [Thu, 10 Jun 1999 15:07:05 +0000 (15:07 +0000)]
At David Ascher's request, clarify that os.system() always returns 0
on Win95 & Win98.

25 years agoFix typo reported by Robert Kern <kernr@ncifcrf.gov>.
Fred Drake [Thu, 10 Jun 1999 15:03:07 +0000 (15:03 +0000)]
Fix typo reported by Robert Kern <kernr@ncifcrf.gov>.

25 years agoFix off-by-one error in Tim's recent change to comment_region(): the
Guido van Rossum [Thu, 10 Jun 1999 14:44:48 +0000 (14:44 +0000)]
Fix off-by-one error in Tim's recent change to comment_region(): the
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!

25 years agoCo-production with Tim Peters, implementing a suggestion by Mark
Guido van Rossum [Thu, 10 Jun 1999 14:39:39 +0000 (14:39 +0000)]
Co-production with Tim Peters, implementing a suggestion by Mark
Hammond: record top-level functions (as Function instances, a simple
subclass of Class).  You must use the new interface readmodule_ex() to
get these, though.

25 years agoMark Hammond writes: Here is another change that allows it to work for
Guido van Rossum [Thu, 10 Jun 1999 14:20:26 +0000 (14:20 +0000)]
Mark Hammond writes: Here is another change that allows it to work for
class creation - tries to locate an __init__ function.  Also updated
the test code to reflect your new "***" change.

25 years agoMark Hammond writes: Tim's suggestion of copying the font for the
Guido van Rossum [Thu, 10 Jun 1999 14:19:46 +0000 (14:19 +0000)]
Mark Hammond writes: Tim's suggestion of copying the font for the
CallTipWindow from the text control makes sense, and actually makes
the control look better IMO.

25 years agoPatch by Jim Fulton to document the new parse_qls().
Guido van Rossum [Thu, 10 Jun 1999 03:11:41 +0000 (03:11 +0000)]
Patch by Jim Fulton to document the new parse_qls().

25 years agoAppend "..." if the appropriate flag (for varargs) in co_flags is set.
Guido van Rossum [Wed, 9 Jun 1999 20:34:57 +0000 (20:34 +0000)]
Append "..." if the appropriate flag (for varargs) in co_flags is set.
Ditto "***" for kwargs.

25 years agoFix bug discovered by Klaus-Juergen Wolf -- it runs into infinite recursion!
Guido van Rossum [Wed, 9 Jun 1999 19:07:22 +0000 (19:07 +0000)]
Fix bug discovered by Klaus-Juergen Wolf -- it runs into infinite recursion!

25 years agoFix by Sjoerd for a package related bug: If you have a non-empy
Guido van Rossum [Wed, 9 Jun 1999 15:49:09 +0000 (15:49 +0000)]
Fix by Sjoerd for a package related bug: If you have a non-empy
__init__.py it isn't read.  (Sjoerd just came up with this, so it's
not heavily tested.)

Other (yet unsolved) package problems noted by Sjoerd:

- If you have a package and a module inside that or another package
  with the same name, module caching doesn't work properly since the
  key is the base name of the module/package.
- The only entry that is returned when you readmodule a package is a
  __path__ whose value is a list which confuses certain class browsers
  that I wrote.  (Hm, this could be construed as a feature.)

25 years agoSet the max recursion limit to 5000 -- rather conservative (this uses
Guido van Rossum [Wed, 9 Jun 1999 15:36:37 +0000 (15:36 +0000)]
Set the max recursion limit to 5000 -- rather conservative (this uses
0.5 MB of the 1 MB available by default for stack on Win32 platforms).

25 years agoJim Fulton writes:
Guido van Rossum [Wed, 9 Jun 1999 15:23:31 +0000 (15:23 +0000)]
Jim Fulton writes:

I've updated cPickle.c to use class exceptions:

Changed pickle error types to classes:

  PickleError
     PicklingError
        UnpickleableError
     UnpicklingError

And change the handling of unpickleable objects so that an UnpickleableError
is raised with the unpickleable object as the argument.  UnpickleableError
has a reasonable string representation and provides access to the problem
object, which is useful during debugging.

[I'm still waiting for patches to do the same to pickle.py.]

25 years agoWhen deallocating a list, DECREF the items from the end back to the start.
Guido van Rossum [Wed, 9 Jun 1999 15:19:34 +0000 (15:19 +0000)]
When deallocating a list, DECREF the items from the end back to the start.

25 years agoSet PATCHLEVEL and PY_VERSION (string version only) to 1.5.2+ to
Guido van Rossum [Wed, 9 Jun 1999 15:16:18 +0000 (15:16 +0000)]
Set PATCHLEVEL and PY_VERSION (string version only) to 1.5.2+ to
indicate to those that are using the CVS access that they are using a
newer-than-1.2.5 version, without committing to a particular version
number or patch level.

25 years agoUpdated lagging version#. Also added some comments about how quote()
Guido van Rossum [Wed, 9 Jun 1999 15:14:50 +0000 (15:14 +0000)]
Updated lagging version#.  Also added some comments about how quote()
and quote_plus() can be optimized tenfold.

25 years agoPatch by Per Cederqvist:
Guido van Rossum [Wed, 9 Jun 1999 15:13:10 +0000 (15:13 +0000)]
Patch by Per Cederqvist:

I've found two places where smtplib.py sends an extra trailing space
on command lines to the SMTP server.  I don't know if this ever causes
any problems, but I'd prefer to be on the safe side.  The enclosed
patch removes the extra space.

25 years agoAdd doc for timegm().
Guido van Rossum [Wed, 9 Jun 1999 15:11:58 +0000 (15:11 +0000)]
Add doc for timegm().

25 years agoAdd unrelated but handy function: timegm(), to calculate Unix
Guido van Rossum [Wed, 9 Jun 1999 15:07:38 +0000 (15:07 +0000)]
Add unrelated but handy function: timegm(), to calculate Unix
timestamp from GMT tuple.

25 years agoDon't just die if gethostbyaddr() fails -- as it can when DNS is
Guido van Rossum [Wed, 9 Jun 1999 15:05:47 +0000 (15:05 +0000)]
Don't just die if gethostbyaddr() fails -- as it can when DNS is
unreachable -- but fall back to using whatever hostname we have.

25 years agoOops, Sjoerd was in a hurry. This patch from him fixes some length
Guido van Rossum [Wed, 9 Jun 1999 13:41:18 +0000 (13:41 +0000)]
Oops, Sjoerd was in a hurry.  This patch from him fixes some length
math in the Chunk class.

25 years agoPatch/new code by Sjoerd Mullender:
Guido van Rossum [Wed, 9 Jun 1999 13:32:28 +0000 (13:32 +0000)]
Patch/new code by Sjoerd Mullender:
Separate the Chunk class out of the aifc module into a new "chunk" module.

25 years agoFix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber:
Guido van Rossum [Tue, 8 Jun 1999 21:23:26 +0000 (21:23 +0000)]
Fix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber:
all processing instruction target names containing 'xml' were
rejected, instead (as the standard rejects) only the name 'xml' itself
(or case variants thereof).

25 years agoOn David Ascher's recommendation: reversed order of 'utime()' and
Greg Ward [Tue, 8 Jun 1999 17:05:21 +0000 (17:05 +0000)]
On David Ascher's recommendation: reversed order of 'utime()' and
'chmod()' in 'copy_file()'.

25 years agoSam's latest versions
Guido van Rossum [Tue, 8 Jun 1999 13:20:05 +0000 (13:20 +0000)]
Sam's latest versions

25 years agoSkip Montanaro:
Guido van Rossum [Tue, 8 Jun 1999 13:13:16 +0000 (13:13 +0000)]
Skip Montanaro:

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.

25 years agoHmm... Tim didn't turn "replace all" into a single undo block.
Guido van Rossum [Tue, 8 Jun 1999 13:06:07 +0000 (13:06 +0000)]
Hmm...  Tim didn't turn "replace all" into a single undo block.
I think I like it better if it os, so here.

25 years agoTim Peters: made replacement atomic for undo/redo.
Guido van Rossum [Tue, 8 Jun 1999 12:54:56 +0000 (12:54 +0000)]
Tim Peters: made replacement atomic for undo/redo.

25 years agoTim Peters:
Guido van Rossum [Tue, 8 Jun 1999 12:54:23 +0000 (12:54 +0000)]
Tim Peters:

+ 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).

25 years agoTim Peters: Taught it more "real Python" rules without slowing it
Guido van Rossum [Tue, 8 Jun 1999 12:53:21 +0000 (12:53 +0000)]
Tim Peters: Taught it more "real Python" rules without slowing it
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.

25 years agoHacked 'set_final_options()' to set (hopefully) appropriate values for
Greg Ward [Tue, 8 Jun 1999 02:04:36 +0000 (02:04 +0000)]
Hacked 'set_final_options()' to set (hopefully) appropriate values for
'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.

25 years agoAdded the 'have_run' dictionary to Distribution, and changed
Greg Ward [Tue, 8 Jun 1999 02:02:00 +0000 (02:02 +0000)]
Added the 'have_run' dictionary to Distribution, and changed
  '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.

25 years agoNow handles NT, through '_init_nt()' function (courtesy of
Greg Ward [Tue, 8 Jun 1999 01:58:36 +0000 (01:58 +0000)]
Now handles NT, through '_init_nt()' function (courtesy of
Amos Latteier <amos@aracnet.com>).

25 years agoRemove unnecessary reference to pyclbr from test() code.
Guido van Rossum [Mon, 7 Jun 1999 15:38:40 +0000 (15:38 +0000)]
Remove unnecessary reference to pyclbr from test() code.

25 years agoExperimental speedup patch by Tim Peters (please test!):
Guido van Rossum [Mon, 7 Jun 1999 15:25:18 +0000 (15:25 +0000)]
Experimental speedup patch by Tim Peters (please test!):

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!

25 years agoFix bug discovered by John W. Shipman -- when the width of a format
Guido van Rossum [Mon, 7 Jun 1999 15:12:32 +0000 (15:12 +0000)]
Fix bug discovered by John W. Shipman -- when the width of a format
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.

25 years agoTim Peters:
Guido van Rossum [Mon, 7 Jun 1999 14:28:14 +0000 (14:28 +0000)]
Tim Peters:

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).

25 years agoMight as well enable CallTips by default.
Guido van Rossum [Fri, 4 Jun 1999 19:21:19 +0000 (19:21 +0000)]
Might as well enable CallTips by default.
If there are too many complaints I'll remove it again or fix it.

25 years agoPatch by Jim Fulton: new function parse_qsl(), which is like
Guido van Rossum [Fri, 4 Jun 1999 17:54:39 +0000 (17:54 +0000)]
Patch by Jim Fulton: new function parse_qsl(), which is like
parse_qs() but returns a list of (name, value) pairs -- which is
actually more correct.  Use this where it makes sense.

25 years agoAdded an "optional" directive, that will include a module if it is available
Jack Jansen [Fri, 4 Jun 1999 15:56:33 +0000 (15:56 +0000)]
Added an "optional" directive, that will include a module if it is available
but not complain if it isn't (giving an ImportError when the frozen code is run).

25 years ago(py-statement-closes-block-p): py-goto-initial-line could leave us in
Barry Warsaw [Thu, 3 Jun 1999 22:18:59 +0000 (22:18 +0000)]
(py-statement-closes-block-p): py-goto-initial-line could leave us in
the line's whitespace.  back-to-indentation should /follow/ this call.

25 years agoNew offerings by Tim Peters; he writes:
Guido van Rossum [Thu, 3 Jun 1999 14:32:16 +0000 (14:32 +0000)]
New offerings by Tim Peters; he writes:

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.

25 years agoEnclose pattern in quotes in status message.
Guido van Rossum [Thu, 3 Jun 1999 14:25:49 +0000 (14:25 +0000)]
Enclose pattern in quotes in status message.

25 years agoMark Hammond fixed some comments and improved the way the tip text is
Guido van Rossum [Thu, 3 Jun 1999 12:07:50 +0000 (12:07 +0000)]
Mark Hammond fixed some comments and improved the way the tip text is
constructed.

25 years agoAt Jim Fulton's request (actually, as a compromise :-), default the
Guido van Rossum [Wed, 2 Jun 1999 18:44:22 +0000 (18:44 +0000)]
At Jim Fulton's request (actually, as a compromise :-), default the
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.

25 years agoMy fix to Mark's code: restore the universal check on <KeyRelease>.
Guido van Rossum [Wed, 2 Jun 1999 18:18:57 +0000 (18:18 +0000)]
My fix to Mark's code: restore the universal check on <KeyRelease>.
Always cancel on <Key-Escape> or <ButtonPress>.

25 years agoA version that Mark Hammond posted to the newsgroup. Has some newer
Guido van Rossum [Wed, 2 Jun 1999 18:12:55 +0000 (18:12 +0000)]
A version that Mark Hammond posted to the newsgroup.  Has some newer
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.

25 years agoCall tips by Mark Hammond (plus tiny fix by me.)
Guido van Rossum [Wed, 2 Jun 1999 16:10:19 +0000 (16:10 +0000)]
Call tips by Mark Hammond (plus tiny fix by me.)

25 years agoChanges by Mark Hammond: (1) support optional output_sep argument to
Guido van Rossum [Wed, 2 Jun 1999 12:06:47 +0000 (12:06 +0000)]
Changes by Mark Hammond: (1) support optional output_sep argument to
the constructor so he can eliminate the sys.ps2 that PythonWin leaves
in the source; (2) remove duplicate history items.

25 years agoChanges by Mark Hammond to allow using IDLE extensions in PythonWin as
Guido van Rossum [Wed, 2 Jun 1999 11:05:19 +0000 (11:05 +0000)]
Changes by Mark Hammond to allow using IDLE extensions in PythonWin as
well: make three dialog routines instance variables.

25 years agoChange by Mark Hammond to allow using IDLE extensions in PythonWin as
Guido van Rossum [Wed, 2 Jun 1999 11:04:29 +0000 (11:04 +0000)]
Change by Mark Hammond to allow using IDLE extensions in PythonWin as
well: make three dialog routines instance variables.

25 years agoHah! A fix of my own to Tim's code!
Guido van Rossum [Tue, 1 Jun 1999 20:06:44 +0000 (20:06 +0000)]
Hah!  A fix of my own to Tim's code!
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).

25 years agoTim Peters again:
Guido van Rossum [Tue, 1 Jun 1999 19:55:34 +0000 (19:55 +0000)]
Tim Peters again:

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.

25 years agoTim Peters again:
Guido van Rossum [Tue, 1 Jun 1999 19:52:34 +0000 (19:52 +0000)]
Tim Peters again:

[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.

25 years agoNew file by Tim Peters:
Guido van Rossum [Tue, 1 Jun 1999 19:49:21 +0000 (19:49 +0000)]
New file by Tim Peters:

One new file in the attached, PyParse.py.  The LineStudier (whatever it was
called <wink>) class was removed from AutoIndent; PyParse subsumes its
functionality.

25 years agoTim Peters keeps revising this module (more to come):
Guido van Rossum [Tue, 1 Jun 1999 19:47:56 +0000 (19:47 +0000)]
Tim Peters keeps revising this module (more to come):

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.

25 years agoAndy Dustman notes that I patched the close() call in the wrong place.
Guido van Rossum [Tue, 1 Jun 1999 18:58:34 +0000 (18:58 +0000)]
Andy Dustman notes that I patched the close() call in the wrong place.
Here's the correct patch!

25 years agoIn class TemporaryFileWrapper, don't cache attributes of tpye int --
Guido van Rossum [Tue, 1 Jun 1999 18:55:36 +0000 (18:55 +0000)]
In class TemporaryFileWrapper, don't cache attributes of tpye int --
these happen to be 'closed' and 'softspace', which may change!

Noted by Dave Ascher (with slightly different solution).

25 years ago1. Catch NameError on import (could be raised by case mismatch on Windows).
Guido van Rossum [Tue, 1 Jun 1999 18:27:14 +0000 (18:27 +0000)]
1. Catch NameError on import (could be raised by case mismatch on Windows).
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.

25 years agoMissed a few.
Guido van Rossum [Tue, 1 Jun 1999 18:23:19 +0000 (18:23 +0000)]
Missed a few.

25 years agoRewritten based on TreeWidget.py
Guido van Rossum [Tue, 1 Jun 1999 18:21:31 +0000 (18:21 +0000)]
Rewritten based on TreeWidget.py

25 years agoObject browser, based on TreeWidget.py.
Guido van Rossum [Tue, 1 Jun 1999 18:20:56 +0000 (18:20 +0000)]
Object browser, based on TreeWidget.py.

25 years agoTree widget done right.
Guido van Rossum [Tue, 1 Jun 1999 18:19:17 +0000 (18:19 +0000)]
Tree widget done right.

25 years agoAs yet unused code for tool tips.
Guido van Rossum [Tue, 1 Jun 1999 18:19:02 +0000 (18:19 +0000)]
As yet unused code for tool tips.

25 years agoEnsure sys.argv[0] is the script name on Run Script.
Guido van Rossum [Tue, 1 Jun 1999 18:18:27 +0000 (18:18 +0000)]
Ensure sys.argv[0] is the script name on Run Script.

25 years agoMove zoom height functionality to separate function.
Guido van Rossum [Tue, 1 Jun 1999 18:17:02 +0000 (18:17 +0000)]
Move zoom height functionality to separate function.

25 years agoFix availability clause; mention availability of similar functionality
Fred Drake [Tue, 1 Jun 1999 17:55:52 +0000 (17:55 +0000)]
Fix availability clause; mention availability of similar functionality
for Windows using win32pipe.

25 years agoA few icons used by ../TreeWidget.py and its callers.
Guido van Rossum [Tue, 1 Jun 1999 15:04:51 +0000 (15:04 +0000)]
A few icons used by ../TreeWidget.py and its callers.

25 years agoNew version by Tim Peters improves block opening test.
Guido van Rossum [Tue, 1 Jun 1999 15:03:30 +0000 (15:03 +0000)]
New version by Tim Peters improves block opening test.

25 years agoJack Jansen's patch to support file:///path/file/name URL syntax.
Guido van Rossum [Tue, 1 Jun 1999 14:36:56 +0000 (14:36 +0000)]
Jack Jansen's patch to support file:///path/file/name URL syntax.

25 years agoGreg McFarlane writes: Tkinter.Text.tag_add should take multiple
Guido van Rossum [Tue, 1 Jun 1999 13:57:15 +0000 (13:57 +0000)]
Greg McFarlane writes: Tkinter.Text.tag_add should take multiple
arguments.  [Slightly changed from submitted patch.]

25 years agoposix_listdir(): When an error occurs, call
Barry Warsaw [Thu, 27 May 1999 23:13:21 +0000 (23:13 +0000)]
posix_listdir(): When an error occurs, call
posix_error_with_filename() instead of posix_error(), passing in the
name argument, so you get information on which directory was being
listed.

25 years agoOops, forgot to remove the individual module indexes for lib & mac now
Fred Drake [Thu, 27 May 1999 21:56:11 +0000 (21:56 +0000)]
Oops, forgot to remove the individual module indexes for lib & mac now
that there's a Global Module Index; there can be only one!