Commit Graph

9135 Commits

Author SHA1 Message Date
Fred Drake 9b134bf716 Added comment about support for rational numbers, and pointer to
Demos/classes/Rat.py.
1998-09-10 18:42:55 +00:00
Fred Drake 7a2f0668e4 Markup nits.
Fixes/index improvements from Michael Ernst <mernst@cs.washington.edu>.
1998-09-10 18:25:58 +00:00
Guido van Rossum 106a470da2 Fixed the words in the comment and error message about defining FULL_PATH.
(It's not SCRIPTPATH!)
1998-09-10 18:22:18 +00:00
Jeremy Hylton 1deebabc77 include <string.h> to get prototype for strcmp
change error messages to be a little more straightforward

change definition of FULL_PATH so that an error is raised if the
setuid wrapper is used un-edited
1998-09-10 18:10:59 +00:00
Fred Drake 3494e4a31f Fix typo in URL; reported by Michael Ernst <mernst@cs.washington.edu>. 1998-09-10 17:55:32 +00:00
Guido van Rossum d21744a1dd Apparently on AIX when using gcc you need to call pthread_init()
(which is not a POSIX threads call!).  Reported and confirmed by Brad
Howes.
1998-09-10 03:04:40 +00:00
Fred Drake f9acc59c55 \itembreak,
\itemjoin:  Remove obsolete macros.

\itemnewline:  Rename to \py@itemnewline, since it's only used internally.
1998-09-09 15:27:43 +00:00
Guido van Rossum 7ca9a1a466 Fix a bug where comparison of a rational with a float failed because
the difference got converted to float.
Put brackets around the string representation of (non-integer)
rationals.
(Sjoerd Mullender.)
1998-09-09 14:07:06 +00:00
Guido van Rossum 76d1f96fe2 Michael P. Reilly suggested this fix: makesetup wants to prepend
"$(srcdir)/" before all source files even when is starts with "/".
1998-09-09 14:04:51 +00:00
Guido van Rossum a063303693 Patch suggested by Perry Stoll -- os.path.normpath(".//x") returned
"/x", should return "x".
1998-09-08 22:28:06 +00:00
Jack Jansen 86ad567c2e Split tcl/tk libs out of other libraries (don't want to build these always) 1998-09-08 19:43:32 +00:00
Jack Jansen 48a9c3634b Mods by Just to allow aliases in sys.path entries 1998-09-07 11:36:17 +00:00
Guido van Rossum 9819983994 Beh, new version must be edited in a separate file. 1998-09-04 21:20:29 +00:00
Guido van Rossum 2053aa6cc0 Use SCRIPT_NAME (if defined) instead of hardcoding /cgi-bin/ when
sending the cookie.  (Suggestion by AMK.)
1998-09-04 21:19:55 +00:00
Guido van Rossum a74d0e4c55 Correct typo in #ifdef: PY_THREAD_D4, should be PY_PTHREAD_D4.
Reported by Jonathan Giddy.
1998-09-04 13:38:32 +00:00
Guido van Rossum 746340d989 Should no longer surround PyOS_Readline() call with
Py_{BEGIN,END}_ALLOW_THREADS macros.  Also get rid of the declaration
for it (it's now in pythonrun.h).
1998-09-03 22:25:05 +00:00
Jeremy Hylton b85c8479eb Easy optimizations of urlparse for the common case of parsing an http URL.
1. use dict.get instead of try/except KeyError
2. if the url scheme is 'http' then avoid the series of
   'if var in [someseq]:'.  instead, inline all of the code.
3. find = string.find
1998-09-02 21:53:16 +00:00
Guido van Rossum f6ae743cb5 Fix suggested by movits@lockstar.com (plus doc string by myself)
for LIST command with msg argument.
1998-09-02 14:42:02 +00:00
Guido van Rossum c86b7c63e0 Make bind variants without a sequence return a tuple of sequences
(formerly it returned a string, which wasn't very convenient).

Add image commands to the Text widget (these are new in Tk 8.0).
1998-08-31 16:54:33 +00:00
Guido van Rossum 164543607c Now that we have standard (optional) long long support, the long long
support in this module can go.  The patch only deletes code
(PyLong_FromLongLong() and PyLong_AsLongLong()).  By Sjoerd Mullender.
1998-08-31 14:14:09 +00:00
Guido van Rossum 80c7bcf667 The previous fix was still broken; the Py_END_ALLOW_THREADS macro was
never executed because of a return statement.  Sigh.
1998-08-29 16:03:27 +00:00
Barry Warsaw 4d1874093f (py-in-literal): How'd this get through? c-point => py-point 1998-08-29 06:32:31 +00:00
Fred Drake 525d7024ab Ignore the generated README file. 1998-08-28 21:34:50 +00:00
Fred Drake 2335a305e5 When building the tarball of the PostScript files, also generate & include a
little README giving the page count of each file when printed.
1998-08-28 21:17:58 +00:00
Fred Drake 7c86c594ea Target to generate a little README file with the page counts of the PostScript
files.
1998-08-28 21:17:07 +00:00
Fred Drake 47f69067d5 Script to generate page counts of the PostScript files. 1998-08-28 21:16:28 +00:00
Fred Drake e1feb8f2dc Support long options that take arguments of the form --option=value as well
as --option value.

Minor nits cleaned up.
1998-08-28 20:21:04 +00:00
Fred Drake d82575d5bf Markup changes in the section on disciplines to match method descriptions
a little better, and produce better HTML.

Add some index entries.
1998-08-28 20:03:12 +00:00
Guido van Rossum 8efa47b63e We now assume that PyOS_Readline() is called with the interpreter lock
held.  It releases the lock around the call to the function pointed to by
PyOS_ReadlineFunctionPointer (default PyOS_StdioReadline()).
1998-08-27 19:43:43 +00:00
Guido van Rossum 44ee479427 Add a 'volatile' to the declaration of threadid in get_thread_ident().
According to Vladimir Marangozov, this is necessary for AIX, where
high optimization levels inline this function and then get it wrong :-(
1998-08-27 19:21:53 +00:00
Guido van Rossum 53195c1a83 Don't release the interpreter lock around PyParser_ParseFile().
It is needed so that tokenizer.c can use PySys_WriteStderr().
1998-08-27 19:14:49 +00:00
Guido van Rossum b9f48608f6 Changes by Richard Wolff:
1) I added a command queue which is helpful to me (at least so far) and
   would also allow syntax like 's;s' (step; step) in conjunction with precmd
2) doc_leader allows the derived class to print a message before the help
   output.  Defaults to current practise of a blank line
3) nohelp allows one to override the 'No help on' message.  I need
    'Undefined command: "%s".  Try "help".'
4) Pass line to self.precmd to allow one to do some parsing: change first
   word to lower case, strip out a leading number, whatever.
5) Pass the result of onecmd and the input line to postcmd.  This allows
   one to ponder the stop result before it is effective.
6) emptyline() requires a   if self.lastcmd:  conditional because if the
   first command is null (<cr>), you get an infinite recursion with the
   code as it stands.
1998-08-27 19:02:51 +00:00
Jack Jansen de57030a1c Added a note about the buildlibs script. 1998-08-27 13:39:01 +00:00
Jeremy Hylton 4722da6ebf fix typo in keyword argument 'allow_frament' should be 'allow_fragment' 1998-08-25 19:45:24 +00:00
Guido van Rossum afd3daedde __file__ used to be always set to the .pyc (or .pyo) file, even if
that file in fact did not exist or at least was not used.  Change this
so that __file__ is *only* set to the .pyc/.pyo file when it actually
read the code object from it; otherwise __file__ is set to the .py
file.
1998-08-25 18:44:34 +00:00
Guido van Rossum 90f827c67e Comment out the print statement about underflow. (This only seems to
happen when you use a non-keyword argument after a keyword argument,
and in this case you also get a syntax error.  I fully suspect that
the underflow is caused by the code that stops generating code when it
detects the syntax error, but I can't find the culprit right now.  I
know, I know.)
1998-08-25 18:22:17 +00:00
Guido van Rossum 2d1ad39b81 Add the type of the object to the error message about calling a non-function. 1998-08-25 18:16:54 +00:00
Guido van Rossum 6e73bf4032 Replace all calls to fprintf(stderr, ...) with PySys_WriteStderr(...). 1998-08-25 18:13:04 +00:00
Guido van Rossum 47fbc4049e Add a version of PySys_WriteStderr() that writes to stderr, so we can
use it in tokenizer.c.
1998-08-25 18:12:36 +00:00
Guido van Rossum d0dc5b06a2 Restructure the file so that it is never empty. No longer needs
Metrowerks specific #ifdef.
1998-08-25 17:48:25 +00:00
Guido van Rossum 3293b07df5 Patch by Mark Hammond to support 64-bit ints on MS platforms.
The MS compiler doesn't call it 'long long', it uses __int64,
so a new #define, LONG_LONG, has been added and all occurrences
of 'long long' are replaced with it.
1998-08-25 16:07:15 +00:00
Guido van Rossum 859b407cf1 Ignore cruft generating by the test run for hello.py. 1998-08-25 15:27:36 +00:00
Guido van Rossum cfbaecc546 Y2K fix affecting asctime(), mktime(), strftime().
2-digit years are now converted using rules that are (according to
Fredrik Lundh) recommended by POSIX or X/Open: 0-68 mean 2000-2068,
69-99 mean 1969-1999.

2-digit years are now only accepted if time.accept2dyear is set to a
nonzero integer; if it is zero or not an integer or absent, only year
values >= 1900 are accepted.  Year values 100-1899 and negative year
values are never accepted.

The initial value of time.accept2dyear depends on the environment
variable PYTHONY2K: if PYTHONY2K is set and non-empty,
time.accept2dyear is initialized to 0; if PYTHONY2K is empty or not
set, time.accept2dyear is initialized to 0.
1998-08-25 14:51:12 +00:00
Guido van Rossum f5a80a4a88 Describe what happens when ``raise C, x'' is called where C is a class
and x is not an instance of C (nor of a class derived of C).
1998-08-25 14:45:41 +00:00
Guido van Rossum dbf7956e52 Clarify Y2K behavior when a tuple with a 2-digit date is passed to
mktime() and such.
1998-08-25 14:44:49 +00:00
Guido van Rossum baf0603493 New version, with contributions from Sjoerd Mullender and Mark Hammond.
Sjoerd writes:

This version of freeze creates one file per Python module, instead of
one humongous file for all Python modules.
bkfile: new module to used to write files with backups.  No new file
is produced if the new contents is identical to the old.
New option "-x excluded-module" for modulefinder test program.
New option "-i filename" for freeze main program to include a list of
options in place of the -i option.
1998-08-25 14:06:55 +00:00
Guido van Rossum 6c74fea07d There was still something wrong. The original NOTTESTS are replaced
by the new '-x' arguments, losing the previous items.  Thus,
test_support, test_b1 & test_b2 are executed (and warnings issued).
(Discovered by Vladimir Marangozov.)
1998-08-25 12:29:08 +00:00
Guido van Rossum 5fdf85254c Patch by Chris Herborth (posted to comp.lang.python)to make it behave
with tags that have - or . in their names.
1998-08-24 20:59:13 +00:00
Fred Drake 607f802886 round(): Mark the second (optional) parameter as optional, since it's
described that way.

setattr():  Clarify that the attribute doesn't need to exist to be set.
1998-08-24 20:30:07 +00:00
Fred Drake c859350fa6 Added some cross-references to the end. 1998-08-24 18:46:14 +00:00