Guido van Rossum [Wed, 18 Feb 1998 13:48:31 +0000 (13:48 +0000)]
(1) Change normpath() to *not* also call normcase().
(2) Fix normcase() to use string.lower() and string.replace() -- it
turns out that the table constructed for translate() didn't work in
locales that have a different number of lowercase and uppercase
letters.
Barry Warsaw [Wed, 18 Feb 1998 00:05:59 +0000 (00:05 +0000)]
Several optimizations:
self.__chips now contains the list of rgbtuple values for the
chips named i - 1 (Tkinter counts from 1, we count from zero).
The chip number was just the index + 1. This means color lookup
need not do an itemcget(), it can just index into __chips.
instead of calling __canvas.itemconfigure(), we glom up a huge Tcl
script and call tk.eval() directly. Actually we do many appends
to a Python list, then string.join() them together into one huge
string. This reduces the overhead of Tkinter but making one fast
call to Tcl.
Barry Warsaw [Wed, 18 Feb 1998 00:02:26 +0000 (00:02 +0000)]
Cache conversions from triplets to rrggbb's and vice versa. Wasteful
on space, but improves performance. Also use map to calculate
triplet_to_pmwrgb().
Fred Drake [Tue, 17 Feb 1998 23:13:19 +0000 (23:13 +0000)]
main(): Include a \label{modindex} in the output so latex won't let us re-use
the name elsewhere. This is useful for the logical filenames project,
since the "modindex" label is hardcoded into .latex2html-init.
Fred Drake [Tue, 17 Feb 1998 15:45:25 +0000 (15:45 +0000)]
Added all-formats target: use this to get both PDF and PS files; using the
"alternate" rules for PDF generation doesn't ensure the PS files get
generated since distiller isn't used.
Switch to the "alternate" rules for PDF generation; this is starting to make
more sense than the distiller-based rule, and requires only free software.
I'm also confident it's working well (meaning I paged through all four
pdflatex-generated PDF files).
Fred Drake [Tue, 17 Feb 1998 05:54:46 +0000 (05:54 +0000)]
Massive changes. Fewer warnings from the Python Library Reference. Still
messy, but the thing seems to be working without bombing completely today.
Formatting lib.texi with TeX doesn't seem to do too badly, either!
Info formatting isn't quite there; that might just have to disappear this
time.
Fred Drake [Mon, 16 Feb 1998 22:30:10 +0000 (22:30 +0000)]
Move optional package inclusions to the top, to make them easier to find.
Code elsewhere in this file tests for the inclusion of the package and does
not need to be uncommented. Comments explain what they do and how to
disable them.
Added support for the optional "fancyhdr" package. If used, page footers
include chapter information on the left and section information on the right.
Both optional packages, "fancyhdr" and "times", are enabled by default. We
may want to disable them before shipping, but I'm not completely convinced.
(How many installations format their own documentation?)
Guido van Rossum [Mon, 16 Feb 1998 22:18:00 +0000 (22:18 +0000)]
Swap two statements in the dedent check loop. This makes absolutely
no difference, but avoids triggering an optimizer bug in the AIX
compiler where the loop unrolling does the wrong thing...
Guido van Rossum [Mon, 16 Feb 1998 15:42:50 +0000 (15:42 +0000)]
Fixed the bug in searching for triple quotes -- change the 'quote2'
variable from a pointer to an index, so a realloc() of the buffer
won't disturb it. Problem found by Vladimir Marangozov.
Guido van Rossum [Mon, 16 Feb 1998 14:52:42 +0000 (14:52 +0000)]
Andrew Kuchling writes:
First, the RNG in whrandom.py sucks if you let it seed itself from the time.
The problem is the line:
t = int((t&0xffffff) | (t>>24))
Since it ORs the two parts together, the resulting value has mostly
ON bits. Change | to ^, and you don't lose any randomness.
Fred Drake [Mon, 16 Feb 1998 06:15:35 +0000 (06:15 +0000)]
Lots of nitty-gritty stuff:
Use \emph{} when referring to title of any of the Python manuals, like is
done in the other manuals.
In some places, use \emph{} or \dfn{} instead of ``...''.
Use \samp{} instead of \code{} when marking identifier prefixes.
Use logical markup wherever it made sense.
Fixed a bunch of typos.
In several places, use "---" instead of "--" to get the emdash.
Start sentences with capital letters and end them with periods, as needed.
"it's" --> "its" in many places: "it's" it *always* a contraction of "it is",
and "its" should always be used for the possessive.
"don't" --> "doesn't"
"should discards any" --> "should discard any"
In C function descriptions, use \var{} to mark parameters in the running
text instead of \code{}. This matches usage in the other manauls better,
and is more consistent with the formatting of the function signatures.
Lots of little changes to implement this.
Lots of fixups needed due to appearant heavy cut-&-paste in the orignal
document.
Mention that the exception objects may be either classes or strings,
depending on the use of -X; they were unequivocally stated to be strings
in the section "Standard Exceptions".
"mkvalue()" --> "Py_BuildValue()"
Description of PyNumber_Power() indicates that the third value is option,
but not how to indicate that it was omitted. Clarified.
Explain the behavior of PyString_FromStringAndSize() if the buffer is NULL.
Explain the Py_complex structure a little (tell what it's used for) and use
a {verbatim} environment for the structure definition itself.
Fix explanation of PyFile_SoftSpace().
Update the example version string to 1.5.
Combined the sections on defining new object types.
Fred Drake [Fri, 13 Feb 1998 21:55:21 +0000 (21:55 +0000)]
Change {datadesc} environments with empty descriptions to \dataline{}s; this
removes extra vertical space from the list of names, and makes the display
more similar to that used in the socket module, where several constants share
a description.
Fred Drake [Fri, 13 Feb 1998 21:49:12 +0000 (21:49 +0000)]
In description of sound_similar(), break up the markup for long
\code{} at each embedded space, so that the words will wrap. This keeps
it from being too ugly.
Fred Drake [Fri, 13 Feb 1998 21:26:35 +0000 (21:26 +0000)]
In description of __import__, second paragraph, break up the markup for long
\code{} at each embedded space, so that the words will wrap. This keeps it
from running off the side of the page, and is only slightly weird.
Guido van Rossum [Fri, 13 Feb 1998 17:18:36 +0000 (17:18 +0000)]
Add case checking feature on import.
This is an option for OS-es with case-insensitive but case-preserving
filesystems. It is currently supported for Win32 and MacOS. To
enable it, #define CHECK_IMPORT_CASE in your platform specific
config.h. It is enabled by default on those systems where it is
supported. On Win32, it can be disabled at runtime by setting the
environment variable PYTHONCASEOK (to any value).
When enabled, the feature checks that the case of the requested module
name matches that of the filename found in the filesystem, and raises
a NameError exception when they don't match.
Fred Drake [Fri, 13 Feb 1998 14:38:23 +0000 (14:38 +0000)]
Use "\samp{...}" instead of "``\code{...}''" when showing markup fragments
in the running text.
For computed attribute and method names (where there's a \var{} part to
the name), use the non-indexing forms of \datadesc{} and \funcdesc{}.
This doesn't change the printed output, but removes 3 rejections from the
makeindex run and allows the LaTeX2HTML support to exclude these from the
index.
Fred Drake [Fri, 13 Feb 1998 14:37:12 +0000 (14:37 +0000)]
Use "\samp{...}" instead of "``\code{...}''" when showing markup fragments
in the running text.
For computed method names (where there's a \var{} part to the name), use
the non-indexing form of \funcdesc{}. This doesn't change the printed
output, but removes 3 rejections from the makeindex run and allows the
LaTeX2HTML support to exclude these from the index.
Fred Drake [Fri, 13 Feb 1998 06:48:05 +0000 (06:48 +0000)]
Lots of stuff:
Handle most (all?) of the page style / numbering magic here so the documents
don't have to do it individually.
Revise the \bcode / \ecode stuff so that the {verbatim} environment handles
it right directly. \bcode / \ecode will be completely removed from all files
(to be checked in momentarily).
Have the {verbatim} environment get the samples indented a bit; this
appearantly had been attempted in the old code, but didn't work because
paragraphs weren't indented.
Make all headers, from chapters on down to subparagraphs, have sans-serif
titles.
\setindexsubitem{}: New macro. Replaces \renewcommand{\indexsubitem{}(...)}
everywhere. This allows LaTeX2HTML to be made to work correctly for
this. That was near impossible with the old mechanisms.
For all {*desc} environments, make the name of the described thing bold as
well as monospaced.
{opcodedesc} environment: Don't index the byte code names; that doesn't seem
terribly useful, and there are a lot of them.
\var{}: More magic to make sure that the size is right even if embedded in
\file{} or some other macro that uses the sans-serif font in running
text.
\bfcode{}: New macro. Makes the font \code{} and bold. (Was unreasonable
using old LaTeX 2.09.)
\file{}: Adjust the size of the sans-serif font a little.
\email{}, \url{}, Make these use the same font as \file{}, but not the
surrounding single-quotes.
Guido van Rossum [Fri, 13 Feb 1998 01:39:16 +0000 (01:39 +0000)]
Fix a horrible race condition -- various routines were storing the
most recently opened URL in self.openedurl of the URLopener instance.
This doesn't really work if multiple threads share the same opener
instance!
Fix: openedurl was actually simply the type prefix (e.g. "http:")
followed by the rest of the URL; since the rest of the URL is
available and the type is effectively determined by where you are in
the code, I can reconstruct the full URL easily, e.g. "http:" + url.
Barry Warsaw [Thu, 12 Feb 1998 16:52:14 +0000 (16:52 +0000)]
(py-compute-indentation): Several changes made to improve navigation
over and around triple-quoted strings:
- move the beginning-of-line to above the p-p-s call
- in the `t' clause of the big cond, where we skip over
triple-quoted strings, first find out if we're looking at a
single or TQS, then skip over it in one fell swoop, instead of
trying to loop over skipage of SQS's.
(py-parse-state): Implement XEmacs only hack to more accurately figure
out whether we're in a string or not. Can't do this in Emacs because
it lacks the necessary primitive, so we just do it the old (and mostly
accurate, but foolable) way for Emacs.
Fred Drake [Wed, 11 Feb 1998 23:01:23 +0000 (23:01 +0000)]
New file. Written by Ulf A. Lindgren <lindgren@ae.chalmers.se>; we have
permission to distribute this without modifications. This is the latest
version, directly from Ulf.