Guido van Rossum [Thu, 14 May 1998 02:32:54 +0000 (02:32 +0000)]
New APIs for embedding applications that want to add their own entries
to the table of built-in modules. This should normally be called
*before* Py_Initialize(). When the malloc() or realloc() call fails,
-1 is returned and the existing table is unchanged.
After a similar function by Just van Rossum.
int PyImport_ExtendInittab(struct _inittab *newtab);
int PyImport_AppendInittab(char *name, void (*initfunc)());
Guido van Rossum [Thu, 14 May 1998 01:00:51 +0000 (01:00 +0000)]
Make sure that PyDict_GetItem[String]() *never* raises an exception.
If the argument is not a dictionary, simply return NULL. If the
hash() on the key fails, clear the error.
Guido van Rossum [Wed, 13 May 1998 20:13:24 +0000 (20:13 +0000)]
From: conrad@cgl.ucsf.edu (Conrad Huang %CGL)
To: python-list@cwi.nl
Date: 13 May 98 18:33:11 GMT
I think I found a bug in CGIHTTPServer.py. (Does anyone care? :-)
I was trying to use it as the web server for uploading files.
Python CGI scripts (using the CGI module) that worked for other
servers (e.g., Netscape Enterprise server) hang when run from
CGIHTTPServer. The problem is that the content type parameters,
in particular the boundary parameter, were not passed through to
the CGI scripts, thus making the MIME parsing code choke.
The first function writes to sys.stdout; the second to sys.stderr. When
there is a problem, they write to the real (C level) stdout or stderr;
no exceptions are raised (but a pending exception may be cleared when a
new exception is caught).
Both take a printf-style format string as their first argument followed
by a variable length argument list determined by the format string.
*** WARNING ***
The format should limit the total size of the formatted output string to
1000 bytes. In particular, this means that no unrestricted "%s" formats
should occur; these should be limited using "%.<N>s where <N> is a
decimal number calculated so that <N> plus the maximum size of other
formatted text does not exceed 1000 bytes. Also watch out for "%f",
which can print hundreds of digits for very large numbers.
Fred Drake [Mon, 11 May 1998 18:23:35 +0000 (18:23 +0000)]
In package Override, use the getcwd() function from the Cwd module instead of
the one from Override.pm (part of latex2html).
Absolutize the TEXINPUTS environment variable, since we can't count on
latex2html doing it for us (even though I sent in a patch, and it really
should).
Implement round() slightly different, so that for negative ndigits no
additional errors happen in the last step. The trick is to avoid
division by 0.1**n -- multiply by 10.0**n instead.
Fix by Sean Reifschneider:
- When facility not specified to syslog() method, use default from openlog()
(This is how it was claimed to work in the documentation)
- Potential resource leak of o_ident, now cleaned up in closelog()
- Minor comment accuracy fix.
Make Tim O'Malley's requested change: in FieldStorage.__init__(), when
method='GET', always get the query string from environ['QUERY_STRING']
or sys.argv[1] -- ignore an explicitly passed in fp.
Fred Drake [Fri, 8 May 1998 04:02:42 +0000 (04:02 +0000)]
l2h target: Do the "right thing" regarding the paper-*/ subdirs as the other
"big" targets. Fix is to set the TEXINPUTS on the command line of the
sub-make.
Fred Drake [Fri, 8 May 1998 04:00:56 +0000 (04:00 +0000)]
Some versions of latex2html don't automatically append the .tex extension to
the name of the main .tex source file if it's not in the current directory.
Fred Drake [Fri, 8 May 1998 03:46:38 +0000 (03:46 +0000)]
$(KPSEWHICH): Use the older style of calling kpsewhich with the arg
specifying *which* type of path to search. This works for both
teTeX 0.4 and 0.9. This is what we call portability these days! ;-)
Fred Drake [Thu, 7 May 1998 19:30:16 +0000 (19:30 +0000)]
Cleaned out some more cruft.
Added some new cruft.
For some of the "big" targets, force things to happen in the "right"
subdirectory, i.e., "make" will build the DVI and PostScript files in the
paper-letter/ directory, and "make PAPER=a4" will build DVI and PostScript
files in the paper-a4/ directory.
Fred Drake [Thu, 7 May 1998 15:03:25 +0000 (15:03 +0000)]
Support the new directory structure.
Some targets may be a little raw, but the basic formatting targets are all
tested, primarily for use from the subdirs. There are probably a few
gotchas, and the paper-*/ directories could use "helper" Makefiles.
Jack Jansen [Thu, 7 May 1998 13:08:58 +0000 (13:08 +0000)]
An applet with Popt and GUSI preferences but without alis resource
didn't work, because the resource file chain was incomplete when we
tried to open the preference file. Fixed.
Fred Drake [Thu, 7 May 1998 01:38:16 +0000 (01:38 +0000)]
New helper script to build the .dvi for a Python manual; usable for the
api, ext, ref, and tut manuals. The Library Reference requires too much
special index processing to make it beneficial to extend this to support
it.