On Windows, put the select file descriptor arrays on the heap.
This is because they are huge and the stack is limited on Windows.
Other platforms keep declaring it on the stack.
Barry Warsaw [Wed, 1 Jul 1998 20:41:12 +0000 (20:41 +0000)]
Several changes:
1. Convert to using re module
2. Added two new exception classes
a. MissingSectionHeaderError which signals an early parsing
exception when options appear in the file before any section
header. Previously a bogus TypeError was thrown deeper down.
b. ParsingError which collates any non-fatal parsing errors.
ConfigParser.read() will raise this after the entire file was
parsed if any errors occurred during parsing (client could just
catch the exception and continue, because the ConfigParser
instance would still be initialized with the valid data).
(small note: Error.__msg => Error._msg)
3. ConfigParser.__read() now uses re which has the following minor
semantic change: underscore is now allowed in section header and
option name. Also, because of the old regexps, theoretically.
Fixed continuation line bug reported by F. Lundh.
4. It seemed that the old ConfigParser automatically added the option
`name' to every section, which contained the name of the section.
This seemed bogus to me so I took it out.
Added a section to the chapter on modules, describing the package system.
The text is almost completely from GvR's essay on packages; some
introductory paragraphs have been removed, and everything after the
'Details' section in the HTML has been dropped (seems too technical). A
paragraph has been added after the sample package layout stating that there
must be a file called__init__.py in a directory to make it a package.
Guido van Rossum [Mon, 29 Jun 1998 23:17:16 +0000 (23:17 +0000)]
Fix by Sjoerd Mullender to support symbolic links and make a backup of
.mirrorinfo. Fix by me to call string.lstrip(filename) to cope with a
bug in strop.strip() in Python 1.4. Additionally, I changed all print
statements that print filenames etc. to put them in backquotes so that
it will be more obvious when there's a funny character on one of them
(such as a space...).
Guido van Rossum [Mon, 29 Jun 1998 20:32:57 +0000 (20:32 +0000)]
For completeness, add a dummy load_package() method to RHooks. It
should never be called, so this isn't really needed, but this
signifies that rexec now supports packages -- because ihooks does.
Guido van Rossum [Mon, 29 Jun 1998 20:29:08 +0000 (20:29 +0000)]
Added findall() to RegexObject -- return a list of all matches in a
string. Added groupdict() to MatchObject -- return the named groups
as a dict. Added default argument to groups() to specify what to
return for unmatching groups; groupdict() also has this.
Guido van Rossum [Sat, 27 Jun 1998 21:53:17 +0000 (21:53 +0000)]
Windows-specific hack to make sure that when LoadLibrary() is called,
the filename contains at least a rudimentary pathname.
(The bad part is that we need to call getcwd() because only a prefix
of ".\\" is not enough -- we prefix the drive letter.)
Guido van Rossum [Sat, 27 Jun 1998 18:25:44 +0000 (18:25 +0000)]
Document optional kwargs argument to start_new_thread(). Also
document new LockType and reverse the preference for exit()
vs. exit_thread() -- exit() is now preferred and exit_thread() is
obsolete.
Jack Jansen [Fri, 26 Jun 1998 14:56:00 +0000 (14:56 +0000)]
Mac version of freeze. Uses standard freeze modules where it can,
augmenting them here and there. For now, it works more-or-less similar
to unix/windows freeze, generating a config.c file, but storing
modules in PYC resources. A template project is also copied.
The hooks are in place to freeze by merging shared libraries so you
can freeze without a C compiler/linker, but this does not work yet.
Guido van Rossum [Tue, 23 Jun 1998 19:31:19 +0000 (19:31 +0000)]
Subsume the interact() function in a class. This should make it
possible to use this in PythonWin, and to replace Fredrik Lundh's
PythonInterpreter class. Fredrik is credited with the class' API.
Guido van Rossum [Mon, 22 Jun 1998 14:07:36 +0000 (14:07 +0000)]
Revert the change of revision 1.30. While it's in general a laudable
goal to use isinstance(x, y) instead of comparing type(x) to y, it
doesn't make sense to change this in the example code for the type()
builtin...
Guido van Rossum [Mon, 22 Jun 1998 03:54:15 +0000 (03:54 +0000)]
Fix the tests for various anomalies in the string-to-numbers
conversions. Formerly, for example, int('-') would return 0 instead
of raising ValueError, and int(' 0') would raise ValueError
(complaining about a null byte!) instead of 0...
Guido van Rossum [Fri, 19 Jun 1998 04:35:45 +0000 (04:35 +0000)]
Turns out that 'winfo id' returns the id as a hex string, with 0x prefix.
The int() function (aliased to getint()) doesn't handle that, so we must
use self.tk.getint() again...
Guido van Rossum [Fri, 19 Jun 1998 04:28:10 +0000 (04:28 +0000)]
There was an error check in a loop in PythonCmd which called
PythonCmd_Error() but failed to return. The error wasn't very likely
(only when we run out of memory) but since the check is there we might
as well return the error. (I think that Barry introduced this buglet
when he added error checks everywhere.)
Guido van Rossum [Wed, 17 Jun 1998 22:37:26 +0000 (22:37 +0000)]
Documented that by default the output goes to stderr, and that a file
keyword argument can be used to direct it somewhere else. Also
documented all the other functions in this module, and even added a
little example.
# Haven't tested the latex for correctness -- all latex installations
# appear broken.
Guido van Rossum [Wed, 17 Jun 1998 18:34:40 +0000 (18:34 +0000)]
In class _Subfile, make sure read(n) can't read beyond EOF. Also
allow negative numbers to specify read until EOF (like for a regular
file's read() method).