Make the syntax of compound command lines more portable (nmake, CygWin).
These changes are an adaptation of SF patch #429611.
Use the new tools/rewrite.py instead of grep/date/sed to transform
html/index.html.in into html/index.html; this is required for portability.
This is really stupid because it cannot be suppressed or altered using
the warning framework; that's because the warning framework is built
on Python interpreter internals, and the parser generator doesn't have
access to any of those (you cannot use anything of type PyObject * in
the parser).
But it's better than nothing, and implementing a proper check for this
appears to require modifying compile.c in a dozen places, for which I
don't have the stamina today. I promise we'll do better in 2.2a2.
At least it tells you the filename and line number (unlike the first
hack I considered :-).
This is probably not sufficient by itself for the info generation, and is
being done mostly to keep the style consistent with additional patches
that will be applied to Doc/Makefile.
replacement for @DATE@ from a TeX file containing a \date{...} mark
(such as texinputs/boilerplate.tex).
This will be used to re-write the html/index.html.in file instead of
a combination of grep, date, and sed -- this is more portable to non-Unix
platforms.
This solves part of the problem reported in SF patch #429611, but does
not use the suggested patch.
building the HTML or text documentation). There is no need to create
it for other formats.
Job.build_html(): The builddir parameter is always passed in, so it need
not be optional.
****************
PyShell: Added functionality:
usage: idle.py [-c command] [-d] [-i] [-r script] [-s] [-t title] [arg] ...
idle file(s) (without options) edit the file(s)
-c cmd run the command in a shell
-d enable the debugger
-i open an interactive shell
-i file(s) open a shell and also an editor window for each file
-r script run a file as a script in a shell
-s run $IDLESTARTUP or $PYTHONSTARTUP before anything else
-t title set title of shell window
Remaining arguments are applied to the command (-c) or script (-r).
******************
idles: Removed the idles script, not needed
******************
idle: Removed the IdleConf references, not required anymore
- This module, despite its name, now should conform to RFC 2822, the
update to RFC 822.
- This module doesn't just represent "email headers", but entire email
messages.
- Added documentation for other useful public functions such as
quote(), unquote(), praseaddr(), and dump_address_pair().
was already correctly parsed (contrary to a comment in Mailman).
test_rfc2822_phrases(): RFC 2822 now requires that we allow `.' in
phrases, which means we must accept dots in unquoted realname parts.
Add a test to check the change in rfc822.py 1.58.
now allowed in unquoted RealName areas (technically, they are defined
as "obsolete syntax" we MUST accept in phrases, as part of the
obs-phrase production). Thus, parsing
To: User J. Person <person@dom.ain>
correctly returns "User J. Person" as the RealName.
AddrlistClass.__init__(): Add definition of self.phraseends which is
just self.atomends with `.' removed.
getatom(): Add an optional argument `atomends' which, if None (the
default) means use self.atomends.
getphraselist(): Pass self.phraseends to getatom() and break out of
the loop only when the current character is in phraseends instead of
atomends. This allows dots to continue to serve as atom delimiters in
all contexts except phrases.
Also, loads of docstring updates to document RFC 2822 conformance
(sorry, this should have been two separate patches).
Check for slice/item deletion, which calls slice/item assignment with a NULL
value, and raise a TypeError instead of coredumping. Bugreport and suggested
fix by Alex Martelli.
Added a patch which modifies idlefork so that it can co-exist with
"official" IDLE in the site-packages directory. This patch is not
necessary if only idlefork IDLE is installed. See INSTALLATION for further
details.
The default behaviour of idlefork idle is to open an editor window instead
of a shell. Complex expressions may be run in a fresh environment by
selecting "run". There are times, however, when a shell is desired.
Though one can be started by "idle -t 'foo'", this script is more
convenient. In addition, a shell and an editor window can be started
in parallel by "idles -e foo.py".
that 'yield' is a keyword. This doesn't help test_generators at all! I
don't know why not. These things do work now (and didn't before this
patch):
1. "from __future__ import generators" now works in a native shell.
2. Similarly "python -i xxx.py" now has generators enabled in the
shell if xxx.py had them enabled.
3. This program (which was my doctest proxy) works fine:
from __future__ import generators
source = """\
def f():
yield 1
"""
exec compile(source, "", "single") in globals()
print type(f())
The default behaviour of idlefork idle is to open an editor window instead
of a shell. Complex expressions may be run in a fresh environment by
selecting "run". There are times, however, when a shell is desired.
Though one can be started by "idle -t 'foo'", this script is more
convenient. In addition, a shell and an editor window can be started
in parallel by "idles -e foo.py".