Commit Graph

2156 Commits

Author SHA1 Message Date
Guido van Rossum 117a5a8138 Return the name of the Tcl command defined by _bind(). This can
optionally be passed to unbind() (or you can apss it to
deletecommand()).
1998-03-27 21:26:51 +00:00
Guido van Rossum 548703a1b8 The usual. 1998-03-26 22:14:20 +00:00
Guido van Rossum 65e5399081 Don't write "if self.dict: self.dict.close()"; just write
"self.dict.close()" and ignore the exception.  The "if self.dict:"
part would be calculated through len(self.dict.keys()), which is very
expensive for a large dictionary...
1998-03-26 22:12:22 +00:00
Guido van Rossum 3ec38f0ee4 A few lines were indented using tabs instead of spaces -- fix them. 1998-03-26 22:10:50 +00:00
Guido van Rossum 45e2fbc2e7 Mass check-in after untabifying all files that need it. 1998-03-26 21:13:24 +00:00
Guido van Rossum 9ea7024754 Delete this unused relic. 1998-03-26 21:07:14 +00:00
Guido van Rossum 7e7ca0ba17 A few lines were indented using spaces instead of tabs -- fix them. 1998-03-26 21:01:39 +00:00
Guido van Rossum 8ca842066c A few lines were indented using spaces instead of tabs -- fix them. 1998-03-26 20:56:10 +00:00
Guido van Rossum fa6e254b34 Mass check-in after untabifying all files that need it. 1998-03-26 20:23:01 +00:00
Guido van Rossum 1847d06493 Reindented with tabs only (seems fair to the Windows crowd). 1998-03-26 20:22:30 +00:00
Guido van Rossum 2830dcc15c Get rid of the Emacs cruft now that Python-mode guess the desired settings! 1998-03-26 19:52:46 +00:00
Guido van Rossum 41360a4696 Mass check-in after untabifying all files that need it. 1998-03-26 19:42:58 +00:00
Guido van Rossum cd0f59ea08 Get rid of the Emacs cruft now that Python-mode guess the desired settings! 1998-03-26 19:30:30 +00:00
Guido van Rossum 69c70a2fd1 Support 'whence' parameter to seek(). 1998-03-25 16:25:26 +00:00
Guido van Rossum c8d36284f3 Give in to Timmy's Tedious Tab Theorem. 1998-03-23 15:31:22 +00:00
Guido van Rossum c457048744 Give in to the tab police. 1998-03-20 20:45:49 +00:00
Guido van Rossum 677bedab0c Fix indent of one line in mkarg(), that got indented badly by the
recent reindent!
1998-03-19 15:14:24 +00:00
Guido van Rossum 3f0666c4a2 Add obvious needed else clause to format_exception(). 1998-03-18 17:48:06 +00:00
Guido van Rossum 96c07fefa9 Prefer clock() over times() for timer function, except on the Mac,
where we use GetTicks() -- its clock() is a crock, with only 1 second
accuracy, I believe.
1998-03-17 14:46:43 +00:00
Guido van Rossum 677fc843ea As Mike Fletcher pointed out, a __deepcopy__() method should be called
with the memo as an argument.
1998-03-13 20:12:17 +00:00
Guido van Rossum 6d4d1c2a25 Added support for "data" URL, by Sjoerd Mullender. 1998-03-12 14:32:55 +00:00
Guido van Rossum 5c1d2297ea Instead of 'import mac', use 'import os' -- this way, the path syntax
manipulation routines can be used on non-Mac platforms (e.g. to
manipulate pathnames in a Mac specific archive).
1998-03-03 21:49:01 +00:00
Guido van Rossum 9e43adbe78 Initialize adlist variable in getrouteaddr(), so an illegal address
doesn't cause a traceback.
1998-03-03 16:17:52 +00:00
Guido van Rossum d8c5b8c90f Typo (coestring -> codestring) discovered by Mark Hammond. 1998-03-02 02:40:39 +00:00
Guido van Rossum 13452644d5 Sjoerd writes: When a multipart message is incomplete, mimify crashes. 1998-02-27 14:40:38 +00:00
Guido van Rossum 6e73af723c New version of tb_lineno(), this time *not* using try-except, to avoid
disturbing the current exception, and returning tb.tb_lineno, which is
the line number of thr traceback, rather than the current line number.
By Jim Hugunin.
1998-02-26 17:25:02 +00:00
Guido van Rossum 46c86bbca9 A working version of the 'args' command (it prints the current values
of the variables known to hold arguments, but that's as close as I can
get, and generally it's close enough).
1998-02-25 20:50:32 +00:00
Guido van Rossum d151d34ebd Add test for core dump -- make sure it doesn't come back! 1998-02-25 17:51:50 +00:00
Guido van Rossum 7266496b00 Tweak the tb_lineno() function to be compatible with JPython, which
has no line number table etc.
1998-02-25 16:33:39 +00:00
Guido van Rossum 21df8f5dc4 Typo: baseWidht -> baseWidth. 1998-02-24 23:26:18 +00:00
Guido van Rossum 0001a11986 Fix bug in trace_vdelete(); should use master's delete command. 1998-02-19 21:20:30 +00:00
Guido van Rossum 2fc4d581ba Added debug statements to report data actually sent and received on
the socket.
1998-02-19 21:19:48 +00:00
Guido van Rossum b1908846af Fix for literal null bytes -- these must be replaced by the four
characters \, 0, 0, 0.
1998-02-19 21:18:56 +00:00
Guido van Rossum 72c2e1b56e Fixed a bug in the gauss() function. The bug was reported by Mike
Miller, who complained that its kurtosis was bad, and then fixed by
Lambert Meertens (author of the original algorithm) who discovered
that the mathematical analysis leading to his solution was wrong, and
provided a corrected version.  Mike then tested the fix and reported
that the kurtosis was now good.
1998-02-19 21:17:42 +00:00
Guido van Rossum 9824509d3e Add rmd() (remove directory command); fix comment in parse257.
In login(), force passwd and acct to '' when they are None (this can
happen in the test program!).
1998-02-19 21:15:44 +00:00
Guido van Rossum 0d530cedd7 Faster implementation of normcase (using string.lower(
string.replace(...)) instead of a for loop).

Don't call normcase() in normpath() -- the filesystem just might be
case preserving...
1998-02-19 21:08:36 +00:00
Guido van Rossum a73033fcc2 Feature added by Bill van Melle: when no timezone is present, assume
local time -- that's better than failure.
1998-02-19 00:28:58 +00:00
Guido van Rossum 16a0bc278e (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.
1998-02-18 13:48:31 +00:00
Guido van Rossum 00455b77a6 Fix sign reversal in mktime_tz discovered by Bill van Melle. 1998-02-18 05:06:30 +00:00
Guido van Rossum 358473c1a2 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.
1998-02-16 14:52:42 +00:00
Guido van Rossum e60142f2c1 Adding output of test_xmllib.py 1998-02-13 16:35:21 +00:00
Fred Drake fe82acc3b1 Fixed typo in docstring: "__ version__" --> "__version__" 1998-02-13 03:24:48 +00:00
Guido van Rossum 8a666e7c56 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.
1998-02-13 01:39:16 +00:00
Guido van Rossum d76732918a Added rmtree(), to recursively remove a directory tree.
Code by David Ascher (docstring by me).
1998-02-06 21:38:09 +00:00
Guido van Rossum 03710d2a40 Two suggested features by Sjoerd:
- use the tempcache in the open() method, too.

- use the "unwrap"ped url as key for the tempcache.
1998-02-05 16:22:27 +00:00
Guido van Rossum c5d8fed261 (1) Use matchobj.groups(), not matchbj.group() to get all groups.
(2) Provisional hack to avoid dying when trying to turn echo on or off
on Macs, where os.system() doesn't exist.
1998-02-05 16:21:28 +00:00
Guido van Rossum c9aef03af4 Make this test work when imported from the interpreter instead of run
from regrtest.py (it still works there too, of course).
1998-01-29 21:53:17 +00:00
Guido van Rossum fc40a8316a Sez The Dragon:
Ok, I fixed the quotes, along with a bug or two.
	Also added another exception.
1998-01-29 17:26:45 +00:00
Guido van Rossum bbe323e52c SMTP client by The Dragon De Monsyne <dragondm@integral.org>. 1998-01-29 17:24:40 +00:00
Guido van Rossum 02505e4850 New version of xmllib from Sjoerd.
The main incompatibility is that the error reporting method is now
called as
 parser.syntax_error(msg)
instead of
 parser.syntax_error(lineno, msg)

This new version also has some code to deal with the <?xml?> and
<!DOCTYPE> tags at the start of an XML document.
The documentation has been updated, and a small test module has been
created.
1998-01-29 14:55:24 +00:00
Guido van Rossum b16a3b8450 (This fix is really by Jeremy)
Here's my suggested replacement for gzip.py for 1.5.1.  I've
re-implemeted methods readline and readlines, added an _unread, and
tweaked read and _read.

I tried a more complicated buffer scheme for unread (using a list of
strings and string.join), but it was more complicated and slower.
This version is a lot faster than the current version and is still
pretty simple.
1998-01-27 19:29:45 +00:00
Barry Warsaw abe2a457de Unpickler.load_inst(), Unpickler.load_obj(), Unpickler.load_build():
Fixed problems when unpickling in restricted execution environments.
These methods try to assign to an instance's __class__ attribute, or
access the instances __dict__, which are prohibited in REE.  For the
first two methods, I re-implemented the old behavior when assignment
to value.__class__ fails.

For the load_build() I also re-implemented the old behavior when
inst.__dict__.update() fails but this means that unpickling in REE is
semantically different than unpickling in unrestricted mode.
1998-01-26 22:47:35 +00:00
Barry Warsaw 5da0f504ba get(): Fixed a bug in the merge order of the dictionaries. This makes
a copy of the defaults dictionary and merges the section's dictionary
into it so that sections can override the defaults.
1998-01-26 22:42:48 +00:00
Guido van Rossum c567b8176a Revamped, to match py_compile.py:
- added docstrings
- support option to specify a different purported directory name
- reindented with 4 spaces
1998-01-19 23:07:55 +00:00
Guido van Rossum f7edadbc58 Add Gopher to list of protocols that support query strings. 1998-01-19 22:27:21 +00:00
Guido van Rossum e7579624ef Fix bad new bug in ftp code -- the test for existing file using NLST
would set the transfer to text mode instead of the specified mode.
1998-01-19 22:26:54 +00:00
Guido van Rossum ca99c2ce75 Fix to ismount(). Can't remember who told me this. 1998-01-19 22:25:59 +00:00
Guido van Rossum 29c4688659 Patch by Tim O'Malley for servers that send a response looking just like
HTTP/1.x 200
instead of
    HTTP/1.x 200 OK
1998-01-19 22:25:24 +00:00
Guido van Rossum d2dd9a8b7f Some patches by Lars Marius Garshol:
- fix type_to_name(); it never worked
- add path_to_selector()
add path_to_datatype_name()
1998-01-19 21:59:48 +00:00
Guido van Rossum 63566e2ef2 Added docstrings.
Added an optional third parameter giving the purported filename for
error messages from the module.

Append a newline to the code string if needed.
1998-01-19 04:01:26 +00:00
Guido van Rossum e2c6e203c6 Add trace methods to class Variable 1998-01-14 16:44:34 +00:00
Guido van Rossum f473cb007b Added tests for qualified sub and split 1998-01-14 16:42:17 +00:00
Guido van Rossum 8687164426 Seems I've found a way to fix this. 1998-01-14 15:40:30 +00:00
Guido van Rossum 0d8fcb233e Update the doc string to emphasize non-Unix behavior earlier;
sys.prefix is no longer empty on any platform that I know of.
1998-01-13 18:32:40 +00:00
Guido van Rossum 2b2b3f9bcb Fix two bugs:
(1) maxsplit was ignored in split().

(2) groups() would return a string instead of a singleton tuple when
there was only one group.
1998-01-12 18:57:53 +00:00
Guido van Rossum 46f37144d3 New module added. 1997-12-31 00:11:03 +00:00
Guido van Rossum 51ca6e3e42 When there's no filename, don't make one up.
Added _test() that behaves (a bit) like gzip.
Fix a comment (*sequential* access is okay -- *random* access it out!)
1997-12-30 20:09:08 +00:00
Guido van Rossum f5910e42d1 Add tests for re.L(OCALE). 1997-12-30 17:32:33 +00:00
Guido van Rossum 380bf64424 Since DSA.py never made it to the release, neither should dos-8x3/dsa.py. 1997-12-30 05:03:39 +00:00
Guido van Rossum d01e9aa0df the usual 1997-12-30 04:20:58 +00:00
Guido van Rossum 1cd6a457d9 Two critical fixes to the changes that I made for Greg McFarlane --
patches provided by Greg (am I glad I sent him my latest version!).
1997-12-30 04:07:19 +00:00
Guido van Rossum 5baf4bc978 Moved things around a bit in interact(), so outout is processed before
input.  When an EOF is read, break out of the loop instead of (by
default) writing an empty line (which doesn't do much good).  Don't
close self when falling through the loop.
1997-12-29 20:05:45 +00:00
Guido van Rossum 9fd41e363b Fixed several bugs reported by Greg McFarmane:
*  The invoke methods of the three Tkinter widgets Button,
    Checkbutton and Radiobutton should return the value returned by
    the callback, (like the Menu widget does):

	def invoke(self):
	    return self.tk.call(self._w, 'invoke')

 *  The select_from method of the Canvas widget should use 'from', not
    'set':

	def select_from(self, tagOrId, index):
	    self.tk.call(self._w, 'select', 'from', tagOrId, index)

    Currently, if you use select_from, you get the error message:
 'TclError: bad select option "set": must be adjust, clear, from, item, or to'

 *  The 'entrycget' and 'type' methods of the Tk menu widget are
    missing from Tkinter.

 *  There is a bug in grid_columnconfigure and grid_rowconfigure.  For
    example, this should return the current value of the 'minsize'
    option for column 0:

	f.grid_columnconfigure(0, 'minsize')

    Instead it returns the same as:

	f.grid_columnconfigure(0)

    I suggest that the hint given in the comment in the
    Tkinter.Misc.configure method should be followed - "ought to
    generalize this so tag_config etc.  can use it".  Repeating the
    same configure code several times in Tkinter is inviting errors.
    [I did not follow this advice --G]

 *  The grid_slaves method should handle options.  Currently, to pass
    options to the grid_slaves method, you have to do something like:

	grid_slaves('-row', 1)
1997-12-29 19:59:33 +00:00
Guido van Rossum 23e21e7cf3 Minor editing corrections. 1997-12-29 19:57:36 +00:00
Guido van Rossum 2003204ba7 Added doc string, provided by Charles Waldman (with some reformatting
and a little editing my me).
1997-12-29 19:26:28 +00:00
Guido van Rossum d499004860 Solve two annoying problems with ftp URLs for Jack: when repeated
retrieving files from the same host and directory, you had to close
the previous instance before opening a new one; and retrieving a
non-existent file would return an empty file.  (The latter fix relies
on maybe an undocumented property of NLST -- NLST of a file returns
just that file, while NLST of a non-existent file returns nothing.  A
side effect, unfortunately, seems to be that now ftp-retrieving an
*empty* directory may fail.  Ah well.)
1997-12-28 04:21:20 +00:00
Guido van Rossum adfacf4e2e Do a better job of keeping the dialog visible when the master window
is near or beyond the edge of the screen.  Patch by Skip Montanaro.
1997-12-28 03:42:50 +00:00
Guido van Rossum 4d9d3f18c2 Typo: Widht instead of Width... 1997-12-27 15:14:43 +00:00
Guido van Rossum ccb5ec62e1 Added expect() method which takes a list of regular expressions and an
optional timeout.  Also moved some imports around.
1997-12-24 22:24:19 +00:00
Guido van Rossum 00f9fea288 Use string.replace instead of regsub.[g]sub. 1997-12-24 21:18:41 +00:00
Guido van Rossum b9b50eb7e0 Decided to add the telnet library that I wrote long ago (it's still in
the Demos/cwilib directory).  Converted comments to doc strings and
used default arguments instead of *args.  Updated the example.
1997-12-24 21:07:04 +00:00
Guido van Rossum b8c42c9825 Add new optional parameter 'suffix' (default ''), which is appended to
the temporary file name.  Also some minor formatting of Jim F's code.
1997-12-19 04:29:50 +00:00
Guido van Rossum 629bcfb8f9 Make this test succeed even when using "import test.test_zlib". 1997-12-18 05:21:07 +00:00
Guido van Rossum fedc6d0d5a Added SOLID definition. 1997-12-16 17:54:18 +00:00
Fred Drake b5323999d2 PhotoImage.put(): Fixed -to handling, including backward compatibility hack.
Guido, please take a look at this.
1997-12-16 15:03:43 +00:00
Guido van Rossum 80fb344a18 On NT, use a better template, ~XXX- where XXX is os.getpid(). 1997-12-15 19:11:53 +00:00
Guido van Rossum 92d91f56a7 Move %x test to nonstandard section because it appears to be locale specific. 1997-12-15 18:06:19 +00:00
Guido van Rossum f0413d4841 Added tag_prevrange analogous to rag_nextrange. 1997-12-15 17:31:52 +00:00
Guido van Rossum 30da0ea124 Believe it or not, some people have an empty group database.
Prevent the test from failing there.
1997-12-15 14:57:19 +00:00
Guido van Rossum 98b9d77666 Change _nametowidget to nametowidget -- it is a public interface. 1997-12-12 00:09:34 +00:00
Guido van Rossum 9e326665cf Remove unneeded "import re". 1997-12-11 21:41:13 +00:00
Guido van Rossum 7814ea64ff Last minute fix to Text.window_cget(), which should properly Tcl-ify
the option name (prepend '-', strip trailing '_').
1997-12-11 17:08:52 +00:00
Guido van Rossum 4d35e6f092 yeah, yeah. 1997-12-11 02:36:42 +00:00
Guido van Rossum 5ac00ac140 Fix problem detected by Greg McFarlane -- callbacks passed to
bind_class() and bind_all() are destroyed when the widget to which
they were passed is destroyed.
1997-12-11 02:03:55 +00:00
Guido van Rossum d1f4984a9b Jim Fulton writes:
The attached patch adds the following behavior to the handling
of REDUCE codes:

- A user-defined type may have a __reduce__ method that returns
  a string rather than a tuple, in which case the object is
  saved as a global object with a name given by the string returned
  by reduce.

  This was a feature added to cPickle a long time ago.


- User-defined types can now support unpickling without
  executing a constructor.

  The second value returned from '__reduce__' can now be None,
  rather than an argument tuple.  On unpickling, if the
  second value returned from '__reduce__' during pickling was
  None, then rather than calling the first value returned from
  '__reduce__', directly, the '__basicnew__' method of the
  first value returned from '__reduce__' is called without
  arguments.

I also got rid of a few of Chris' extra ()s, which he used
to make python ifs look like C ifs.
1997-12-10 23:40:18 +00:00
Guido van Rossum d0753e20b2 At Barry's suggestion, plug the security leak by using an empty
__builtins__ for all calls to eval().  This still allows someone to
write string.atof("[1]*1000000") (which Jim Fulton worries about) but
effectively disables access to system modules and functions.
1997-12-10 22:59:55 +00:00
Guido van Rossum 90d62ab0a1 Since this module is used as a fallback in case no built-in modules
have been configured, string.atof() should not fail when "import re"
fails (usually because pcre is not there).

This opens up a tiny security hole: *if* an attacker can make "import
re" fail, they can also make string.atof(arbitrary_string) evaluate
the arbitrary string.  Nothing to keep me awake at night...
1997-12-10 22:35:02 +00:00
Guido van Rossum e680546894 Don't specify base 0 to string.atoi when unpickling integers in text
mode.  The pickler always uses base 10 so the default base should be
fine.  (The base gets us in trouble when there's no strop module, as
the atoi() in string.py only supports base 10.  This is for JPython.)
1997-12-10 19:36:41 +00:00
Guido van Rossum e44a8d9987 Support uue and x-uue as short names for uuencode. 1997-12-10 18:54:36 +00:00
Guido van Rossum 9ab94c18d8 Doc strings and reformatting with 4 spaces bty Mitch Chapman.
Untabified and minor tweaks by me.
1997-12-10 16:17:39 +00:00
Guido van Rossum 5bdea89c89 # Typos in the comments giving the names of two recently added distributions. 1997-12-09 19:43:18 +00:00
Guido van Rossum b978d18fec Guess... :-) 1997-12-09 16:56:41 +00:00
Guido van Rossum 3d20986d96 Checking in ConfigParser.py -- I don't see a reason why this can't be
liberated.  This was originally written by Ken and later revamped by
Barry.
1997-12-09 16:10:31 +00:00
Guido van Rossum 7b8970ac88 Deleting ni.py; renamed to ni1.py, really. 1997-12-09 14:58:26 +00:00
Guido van Rossum 6599fb0917 Make close(), and hence __del__(), robust in the light of the world
being destroyed already.
1997-12-09 14:18:33 +00:00
Guido van Rossum 41999c164e Doc strings by Mitch Chapman (with a little reformatting).
Also reformatted the whole module with 4 spaces and no tabs.
1997-12-09 00:12:23 +00:00
Guido van Rossum 6a99984e79 Use long() instead of int() to compare mktime(localtime(t) with t... 1997-12-08 21:48:01 +00:00
Guido van Rossum dfa6790bd6 New re version from AMK 1997-12-08 17:12:06 +00:00
Guido van Rossum c5d2d51700 Apply the same change to classes without an __getinitargs__() method
as in pickle: the new instance is created without calling __init__().
1997-12-07 16:18:22 +00:00
Guido van Rossum 61de0ac4bb Reindented according to new standard, without tabs.
Also added one more os2 specific piece of code, by Jeff Rush.
1997-12-05 21:24:30 +00:00
Guido van Rossum 63cf3960df ospath.py has been obsolete for long enough. 1997-12-05 19:49:14 +00:00
Guido van Rossum e467be6511 When instantiating a class with no arguments and where the class does
not define __getinitargs__, bypass the __init__ constructor
completely.  This uses the trick of instantiating an empty dummy class
and then changing inst.__class__ to the real class.  This is done in
two places: once for the INST and once for the OBJ format code.

Also replaced the much outdated long doc string with a short summary
of the module; the information of that doc string is already
incorporated in the library reference manual.
1997-12-05 19:42:42 +00:00
Guido van Rossum 346f7af8ff Added doc strings and reindented according to new standard, without tabs.
(Like ntpath.py, this was contributed by "Charles G. Waldman" <cgw@pgt.com>)
1997-12-05 19:04:51 +00:00
Guido van Rossum 15e22e1c3a Added doc strings and reindented according to new standard, without tabs. 1997-12-05 19:03:01 +00:00
Guido van Rossum 7f9732880e Fix the exclusion of "config" in the methods copied from Pack to also
exclude "configure".
1997-12-05 17:05:04 +00:00
Guido van Rossum e612be5926 Patch my Marc Lemburg to fix urljoin("/a", "..") and urljoin("/a", "..#1"). 1997-12-03 22:38:56 +00:00
Guido van Rossum 3fa440ea91 Refinement of home for NT, courtesy Jeff Bauer. 1997-12-03 22:34:03 +00:00
Guido van Rossum ab76af3d65 Provide default for blocksize on retrbinary (Skip Montanaro). 1997-12-03 19:34:14 +00:00
Guido van Rossum 98ee50b5a4 More generated files for netbsd 1.x, by Anders Andersen. 1997-12-03 18:44:57 +00:00
Guido van Rossum 91221c29f2 Support for netbsd1 and freebsd3, after suggestions by Anders Andersen
and Jacques Vidrine.
1997-12-02 20:30:29 +00:00
Guido van Rossum c0f29c2d31 When a port is specified in an ftp:// URL, must convert it to a number! 1997-12-02 20:26:21 +00:00
Guido van Rossum 80f8be8901 Support for the "event" command, new in Tk 4.2.
By Case Roole.
1997-12-02 19:51:39 +00:00
Guido van Rossum 11fbef5f92 Sjoerd sez: global substitute \240 with \177. 1997-12-02 17:45:39 +00:00
Guido van Rossum 376467ada6 Added stropts.h to the list of files automatically regenerated. 1997-12-02 14:37:20 +00:00
Barry Warsaw 5284589097 Generated from Solaris 2.6's /usr/include/sys/stropts.h via
Tools/scripts/h2py.py.  This file contains many useful streamio(7)
constants, especially the ones that support passing open file
descriptors through a pipe: I_RECVFD and I_SENDFD.
1997-12-02 04:49:09 +00:00
Guido van Rossum 893a8cbae7 *** empty log message *** 1997-12-02 03:42:17 +00:00
Guido van Rossum cf4559a62e Added Pareto and Weibull distributions, courtesy Jeremy Hylton. 1997-12-02 02:47:39 +00:00
Barry Warsaw c99a239f42 Added strop.split tests when sep is None. 1997-12-02 00:30:04 +00:00
Guido van Rossum 06ba34c5d4 In string.split(), honor maxsplit (if > 0).
In string.splitfields(), ignore maxsplit if <= 0, rather than ignoring
maxsplit=0 but effectively treating negative numbers the same as
maxsplit=1.  Also made the test for maxsplit slightly more efficient
(set it to the length of the string when <= 0 so the test for its
presence can be omitted from the loop).
1997-12-01 15:25:19 +00:00
Barry Warsaw 58a88b3e34 _Environ(): Added __getinitargs__() method so os.environ.copy() works,
as does unpickling, as in: pickle.loads(pickle.dumps(os.environ)).

Hope this is right!  Don't shoot me Guido. :-)
1997-12-01 04:30:19 +00:00
Barry Warsaw 9181190c76 Added tests of strop.replace() 1997-11-29 00:25:30 +00:00
Guido van Rossum 0b23348aa9 The usual 1997-11-26 15:44:34 +00:00
Guido van Rossum e2d4dd194b Use fuzzy comparison from test_support to compare outcome of
pow(x,y,z) to pow(x,y)%z.
1997-11-24 22:24:22 +00:00
Guido van Rossum 8e9ebfd337 os2 patch by Jeff Rush 1997-11-22 21:53:48 +00:00
Guido van Rossum c0b93191e6 bind_class should return a value 1997-11-22 21:49:56 +00:00
Guido van Rossum be7c45eec4 New address parser by Ben Escoto replaces
Sjoerd Mullender's parseaddr()
1997-11-22 21:49:19 +00:00
Guido van Rossum e6c128f428 Use fstat if we can; write MAGIC into file last. 1997-11-22 21:48:26 +00:00
Guido van Rossum 7d5b99d8bf A new standard module, as discussed on comp.lang.python, to simplify
the writing of filters.

Typical use is:

    import fileinput
    for line in fileinput.input():
        process(line)

This iterates over the lines of all files listed in sys.argv[1:],
defaulting to sys.stdin if the list is empty or when a filename is
'-'.

There is also an option to use this to direct the output back to the
input files.
1997-11-21 17:12:59 +00:00
Barry Warsaw 3d96d522ec (Queue.Empty): When class based exceptions are in force, derive this
class from the standard base exception Exception.  Otherwise define
Queue.Empty as a string exception.

(Queue): 8-space to 4-space indentation conversion.  Also, basically
recast all method comments into docstrings.
1997-11-20 19:56:38 +00:00
Guido van Rossum bd1169a93e Add Martin von Loewis as the author of this module. 1997-11-19 19:02:09 +00:00
Guido van Rossum eef1d4e8b1 User-level locale module. A wrapper around _locale which adds
format(), str(), atof(), and atoi().  The last three are locale
sensitive versions of the corresponding standard functions (only for
numbers though); format() does general %[efg] formatting taking the
locale into account, optionally with thousands grouping.
1997-11-19 19:01:43 +00:00
Guido van Rossum 83600050d0 Assert that the proxies object passed in to the URLopener constructor
is indeed a dictionary (or a mapping).
1997-11-18 15:50:39 +00:00
Guido van Rossum 421c224044 Added docstrings (contributed by Martin von Loewis). 1997-11-18 15:47:55 +00:00
Guido van Rossum 5d68e8e312 Fixed case sensitivity of attributes (they are case *sensitive*). 1997-11-18 15:27:20 +00:00
Guido van Rossum a219efaa7b Sjoerd Mullender's xml parser (based on sgmllib, somewhat). 1997-11-18 15:09:54 +00:00
Guido van Rossum 368e06b6f0 Some restructuring.
All geometry manager methods that apply to a master widget instead of
to a slave widget have been moved to the Misc class, which is
inherited by all of Tk(), Toplevel() and Widget().  They have been
renamed to have their geometry manager name as a prefix,
e.g. pack_propagate(); the short names can still be used where
ambiguities are resolved so that pack has priority over place has
priority over grid (since this was the old rule).

Also, the method definitions in the Pack, Place and Grid classes now
all have their respective geometry manager name as a prefix
(e.g. pack_configure); the shorter names are aliases defined through
assignment.

A similar renaming has been done for all config() methods found
elsewhere; these have been renamed to configure() with config being
the alias (instead of the other way around).  (This may not make much
of a difference but the official Tk command name is now 'configure'
and it may help in debugging tracebacks.)

Finally, a new base class BaseWidget has been introduced, which
implements the methods common between Widget and Toplevel (the
difference between those two classes is that Toplevel has a different
__init__() but also that Toplevel doesn't inherit from Pack, Place or
Grid.
1997-11-07 20:38:49 +00:00
Guido van Rossum c1189eb524 Separate out a function pystones(loops=LOOPS) which runs the benchmark
and returns a (benchtime, stones) tuple.  The main() function now
calls this and prints the report.  Fred Drake's code.
1997-11-06 15:45:05 +00:00
Guido van Rossum f849291e2b Add __init__.py to test package. 1997-11-06 15:41:23 +00:00
Guido van Rossum bfa9f13e14 islink() returns false, but there is no constant false! Return 0 instead. 1997-11-04 18:40:53 +00:00
Guido van Rossum 19f44560f2 Use ``0'' instead of ``None'' to reset the underlying object in close
methods.  Using None causes problems if the destructor is called after
the __builtin__ module has already been destroyed (unfortunately, this
can happen!).  I can't just delete the object because it is actually
tested for (if self._sock: ...).  Setting it to 0 is a bit weird but
works.
1997-11-04 17:32:59 +00:00
Guido van Rossum e8d113976c Add empty __init__.py files to the test packages so the new policy
will recognize them.
1997-10-31 18:33:41 +00:00
Guido van Rossum 613418aa09 New version from Sjoerd, small bugfix + optimizations. 1997-10-30 15:27:37 +00:00
Guido van Rossum 0874f7fdaf Tests for tokenize.py (Ka-Ping Yee) 1997-10-27 22:15:06 +00:00
Guido van Rossum fefc922cef New, fixed version with proper r"..." and R"..." support from Ka-Ping. 1997-10-27 21:17:24 +00:00
Guido van Rossum 3b631775b2 Redone (by Ka-Ping) using the new re module, and adding recognition
for r"..." raw strings.  (And R"..." string support added by Guido.)
1997-10-27 20:44:15 +00:00
Guido van Rossum 036309b13e This should hopefully finally clean up the remaining __del__ related
problems with this module, even if an instance of a derived class is
kept alive longer than the urllib module itself...
1997-10-27 18:56:19 +00:00
Guido van Rossum af8d2bf4d8 Bugfix in match() -- the number of registers shouldn't be divided by two! 1997-10-27 18:17:19 +00:00
Guido van Rossum e6eef4b4a3 Use __dict__.update(state) instead of for loop over state.items() and
call to setattr().  This changes semantics, following the change
already implemented in pickle.

Also reindented a few lines properly.
1997-10-26 17:00:25 +00:00
Guido van Rossum 31626bce66 re -> regex conversions by Sjoerd. 1997-10-24 14:46:16 +00:00
Guido van Rossum f81e5b9c78 New module -- converts regex regular expressions to re style.
There are two ways to use this -- as a filter (e.g. using C-U M-| on a
regex string literal in an Emacs buffer) or from a Python program
which imports this as a module.  Read the doc string for more info,
and also some caveats (some cases aren't handled right).
1997-10-23 22:43:50 +00:00
Guido van Rossum 1fef181183 Although it's hard to be sure, I *think* this is a working conversion
from regex to re style regular expressions.  This should make sgmllib
and htmllib threadsafe, so I can now create a threaded version of
webchecker...
1997-10-23 19:09:21 +00:00
Guido van Rossum 57a68e08f9 Remove redundant import regsub. 1997-10-23 17:50:10 +00:00
Guido van Rossum 9694fcab53 Convert all remaining *simple* cases of regex usage to re usage. 1997-10-22 21:00:49 +00:00
Guido van Rossum 426916e50e Add pcre to the list of safe modules. 1997-10-22 20:56:32 +00:00
Guido van Rossum f7a8b45d71 Remove outdated comments. 1997-10-22 20:54:50 +00:00
Guido van Rossum 12f86ade21 Removed some unneeded imports, moved others around. 1997-10-22 20:52:53 +00:00
Guido van Rossum a8832b45e7 Removed unneeded imports of regex and regsub. 1997-10-22 20:50:37 +00:00
Guido van Rossum acfb82a530 Use re instead of regex. Also remove bogus return statement from __init__(). 1997-10-22 20:49:52 +00:00
Guido van Rossum 8566e474b4 Added pgrep() function, which is like grep/egrep/emgrep but uses Perl
syntax, by virtue of the new re module.
1997-10-22 20:44:58 +00:00
Guido van Rossum b49144244c Deleted this long-obsolete module 1997-10-22 16:29:53 +00:00
Guido van Rossum 24986204cf Added "new" symbol defns for RE_ANSI_HEX and RE_NO_GNU_EXTENSIONS --
hopefully the last maintenance on this module, ever.
1997-10-22 16:28:53 +00:00
Guido van Rossum 4e8ef5fcd3 Catch KeyboardInterrupt separately and propagate it, instead of
reporting a "crash".

Use sys.exc_info() instead of sys.exc_type and sys.exc_value.
1997-10-20 23:46:54 +00:00
Guido van Rossum 1510565cb5 Add optional 4th argument to count(), matching find() etc.
Also change all occurrences of "x == None" to "x is None" (not that it
matters much, these functions are all reimplemented in strop -- but
count() is not).
1997-10-20 23:31:15 +00:00
Guido van Rossum dd65975ac7 Patch by Charles G. Waldman to add optional user and password
arguments to NNTP.__init__(), for nntp servers that need them.
1997-10-20 23:29:44 +00:00
Guido van Rossum 7eecc246a7 Remove .pyo files like .pyc files. 1997-10-20 23:16:58 +00:00
Guido van Rossum fb5cef1160 Added separate tests for {}.get(). 1997-10-20 20:10:43 +00:00
Barry Warsaw 9b887c7911 Added tests of dict.get() 1997-10-20 17:34:43 +00:00
Fred Drake 654451dc54 splitpasswd(): The parameter is named "user", not "host". 1997-10-14 13:30:57 +00:00
Guido van Rossum 2861f4ec6e Open files in binary mode (Jack) 1997-10-08 15:23:23 +00:00
Guido van Rossum cbf3dd53b4 Use better timer on the mac
Open files in binary mode
(Jack)
1997-10-08 15:23:02 +00:00
Guido van Rossum 45ac47c0b2 Allow open file as parameter (must be seekable) (Jack) 1997-10-08 15:22:32 +00:00
Guido van Rossum 9ec2ed466b Change test for re.sub() involving g<...> to use a multi-character
identifier.  The previous re.py had a bug that wouldn't show up with
single-char identifier...
1997-10-08 04:05:08 +00:00
Guido van Rossum 5bc5b14f6d Checking in AMK's latest installement. 1997-10-08 02:08:04 +00:00
Guido van Rossum d2c0ec78d2 Use `...` around binary strings. 1997-10-07 21:22:48 +00:00
Fred Drake 53ad776cbf Remove this pathetic little module! 1997-10-07 18:12:20 +00:00
Guido van Rossum c6e8fd6de7 Temporary fix to valid_identifier(). 1997-10-07 14:51:18 +00:00
Guido van Rossum 2f3941d743 Return the error code from most commands, rather than swallowing it.
Adapted the example (lying slightly about the string printed by
login()).
1997-10-07 14:49:56 +00:00
Guido van Rossum ae590db3ce Fix join to support multiple arguments.
(Why isn't this file identical to ntpath.py?)
1997-10-07 14:48:23 +00:00
Guido van Rossum abfdd70665 Add XXX note about wanting support for copy_reg.py... 1997-10-07 14:47:50 +00:00
Guido van Rossum 90981e0e70 Add Jeff Epler's interact() function. Note that it is broken.
(It should probably be withdrawn :-( )
1997-10-07 14:47:24 +00:00
Guido van Rossum d5484fb75c Add optional arguments lo and hi to insort() and bisect(), to support
using arrays containing leading or trailing garbage.
1997-10-07 14:45:49 +00:00
Fred Drake e3dbc7e422 Reduced number of temporary names used at module scope. Use underscores in
front of temporary names in the module namespace.
1997-10-06 21:28:04 +00:00
Fred Drake dc1a072e02 Reduced number of temporary names used at module scope. Use underscores in
front of temporary names in the module namespace.
1997-10-06 21:06:29 +00:00
Fred Drake 923c4eeeef Don't do weird things with the "import parser"; just do it. Sheesh... 1997-10-06 20:56:43 +00:00
Guido van Rossum a11ccccd24 The usual (and some new modules). 1997-10-06 20:19:59 +00:00
Barry Warsaw fc3e61cd28 UserDict.get(): New method to mirror built-in dictionaries' get()
method.
1997-10-06 17:50:04 +00:00
Fred Drake 596db3161c Move the __getitem__() definition from StandardException to Exception.
This allows stuff like this out of the box:

	try:
	    ...
	except socket.error, (code, msg):
	    ...
1997-10-06 15:48:20 +00:00
Guido van Rossum bf9d353bab New "re" regular expression support.
The new re module was written by Andrew Kuchling and uses the pcre
code in ../Modules/.  The old re module has been renamed to re1,
just in case you need it for comparison.
1997-10-06 14:45:17 +00:00
Guido van Rossum 6af6d3511e Turns out whatsound.py and sndhdr.py were identical modules.
Since there's also an imghdr.py file, I propose to make sndhdr.py the
official one.  For compatibility, whatsound.py imports * from
sndhdr.py.
1997-10-04 20:29:17 +00:00
Guido van Rossum f1b0009a78 Fix path search for test data file so it works under more circumstances. 1997-10-01 22:10:32 +00:00
Guido van Rossum ae631f7f45 There was actually a test that ensured that raising an exception A
with an instance of a derived class B would really raise an A, not a
B.  Since Barry fixed this anomalous behaviour, I though I might as
well fix the test!  (Hmm, Barry, did you not run the tests or did you
miss that test_opcodes failed?)
1997-10-01 04:41:05 +00:00
Guido van Rossum a008fa52be Fixed test for socket.error to work when it's a class exception. 1997-10-01 04:39:05 +00:00
Guido van Rossum ac8a9f3ee9 Handy utility to guess MIME type from extension. 1997-09-30 19:05:50 +00:00
Guido van Rossum 83bd9a9c8c Move Widget.config() c.s. to Misc class, so the Tk class also inherits them. 1997-09-29 23:24:52 +00:00
Guido van Rossum 332e14437c Use sys.exc_info() where needed.
Use "re" module, making it threadsafe.
1997-09-29 23:23:46 +00:00
Guido van Rossum f15d15964b Use sys.exc_info() where needed. 1997-09-29 23:22:12 +00:00
Guido van Rossum c90ad2103e No longer need to be very careful with saving the exception state
first.  Don't store the traceback as a local variable, to avoid
circular references.
1997-09-29 23:17:48 +00:00
Guido van Rossum a3beb63eb7 Removing emacs.py, which is obsolete. 1997-09-29 13:19:53 +00:00
Guido van Rossum da286666b2 Add optional bufsize argument to various calls so we can make the
os.fdopen() calls unbuffered.  I presume that it's enough if we can
make all three of them (for stdin, stdout, and stderr) unbuffered and
don't need to specify different buffer sizes per file -- that would
complicate the interface more than I care for.
1997-09-29 04:04:39 +00:00
Guido van Rossum 4752966193 Use Marc Lemburg's tb_lineno() to calculate the correct line number.
Apparently the traceback object doesn't contains the right linenumber
when -O is used.  Rather than guessing whether -O is on or off, use
tb_lineno() unconditionally.
1997-09-26 22:43:02 +00:00
Guido van Rossum 2781fbe46c Word completion for the new readline.set_completer() function.
When completing a simple identifier, it completes keywords, built-ins
and globals in __main__; when completing NAME.NAME..., it evaluates
(!) the expression up to the last dot and completes its attributes.

It's very cool to do "import string" type "string.", hit the
completion key (twice), and see the list of names defined by the
string module!

Tip: to use the tab key as the completion key, call

    readline.parse_and_bind("tab: complete")
1997-09-26 22:04:56 +00:00
Guido van Rossum 6dd4868681 The command can now either be a string (as before) or a list of
arguments for execvp (for those who don't want the shell's argument
parsing).
1997-09-18 20:00:39 +00:00
Barry Warsaw 25131faffe NumberError => ArithmeticError 1997-09-16 21:50:59 +00:00
Guido van Rossum c56ba38350 Two subtle changes:
(1) Introduce Exception as the conceptual root class for all exceptions.

(2) Do less work in __init__(), and more in __str__ (store args
unchanged).
1997-09-16 18:42:04 +00:00
Guido van Rossum 7883e1dfbd Entirely rewritten parseaddr() function by Sjoerd Mullender.
(Includes a patch he sent me a few days later.)
1997-09-15 14:12:54 +00:00
Guido van Rossum a1dbe50ec2 Added code to emit trailing ',' for singleton tuples in two places. 1997-09-14 23:21:51 +00:00
Guido van Rossum 4fb5b28dfc Three independent changes:
- Don't use "from copy_reg import *".

- Use cls.__module__ instead of calling whichobject(cls, cls.__name__);
  also try __module__ in whichmodule(), just in case.

- After calling save_reduce(), add the object to the memo.
1997-09-12 20:07:24 +00:00
Guido van Rossum 4ece95d55a #Added doc string. 1997-09-09 20:44:04 +00:00
Guido van Rossum 4f9f8e3599 Make functionality more closely the same as what's implemented by default. 1997-09-09 20:39:58 +00:00
Guido van Rossum 501d0bb7ad *** empty log message *** 1997-09-09 20:35:20 +00:00
Guido van Rossum 1c0d851a32 Renamed platform specific subdirectories to plat-*. 1997-09-09 03:50:59 +00:00
Guido van Rossum 5c1f5bd5f6 Renamed dos_8x3 to dos-8x3. 1997-09-09 03:42:09 +00:00
Guido van Rossum d7500fcbb4 These directories renamed: tkinter -> lib-tk, stdwin -> lib-stdwin. 1997-09-09 03:39:21 +00:00
Guido van Rossum c8bf884248 Added test for __all__. 1997-09-08 16:06:20 +00:00
Guido van Rossum e8fd143b7e #Adapt the doc string to reality. 1997-09-08 02:47:46 +00:00
Guido van Rossum 10499324cf Initialize self.__tempfiles to [] in the constructor (else it remains
a shared class variable -- but each instance will attempt to clean it
up entirely ob cleanup).
1997-09-08 02:16:33 +00:00
Guido van Rossum 62b297b698 Change packages -> site-packages 1997-09-08 02:14:09 +00:00
Guido van Rossum d6ead328b3 *Semantic change*: when unpickling the instance variables of an
instance, use inst.__dict__.update(value) instead of a for loop with
setattr() over the value.keys().  This is more consistent (the
pickling doesn't use getattr() either but pickles inst.__dict__) and
avoids problems with instances that have a __setattr__ hook.

But it *is* a semantic change (because the setattr hook is no longer
used).  So beware!
1997-09-08 02:08:11 +00:00
Guido van Rossum eeadc04200 Look for uuencoded test files in the directory containing this module, too.
(This is necessary because when imported as test.test_rgbimg, the test
directory is not on sys.path.)
1997-09-07 16:54:34 +00:00
Guido van Rossum bc8b2bd95e Look for uuencoded test files in the directory containing this module, too.
(This is necessary because when imported as test.test_rgbimg, the test
directory is not on sys.path.)
1997-09-07 16:50:45 +00:00
Guido van Rossum f9fa20b2d2 Pass optional arguments (globals(), locals(), []) to __import__() so
it will run as package test, e.g. this will run the test suite:

    import test.regrtest
    test.regrtest.main()
1997-09-07 16:42:34 +00:00
Guido van Rossum 10887a3067 Fix details in the test:
- traceback should go to stdout!
- don't import ni, import t1!
- nicer support for command line options, only if run as __main__
1997-09-07 06:12:11 +00:00
Guido van Rossum 81da02e6aa Added feeble test for reload() of packages and submodules. 1997-09-06 19:58:53 +00:00
Guido van Rossum 6c61242c78 Test set for package import. 1997-09-06 18:42:57 +00:00
Guido van Rossum f394f56c2b Made the 'info' argument to SyntaxError optional, so phase-2 syntax
errors are handled (these gave ``TypeError: not enough arguments'').

Also changed its __str__() to correct a typo (missing self.) and
return str(self.msg) to ensure the result is always string.

Also changed the default __str__ to simply return str(self.args).
1997-09-05 19:00:56 +00:00
Jeremy Hylton 6459627b12 Now produces some reassuring output. 1997-09-04 23:42:01 +00:00
Jeremy Hylton 9dc2b8ee07 Many more tests, including tests of many optional arguments. 1997-09-04 23:41:37 +00:00
Guido van Rossum 898c915a31 Added some try-excepts so that it can be imported in restricted mode
(though some type names are undefined in that case, e.g. CodeType
(inaccessible), FileType (not always accessible), and TracebackType
and FrameType (inaccessible).
1997-09-04 22:12:34 +00:00
Guido van Rossum d807b7589b The re test suite is very slow on slower hosts.
To save time, only run the first and last 10 tests except in verbose mode.
1997-09-04 14:35:45 +00:00
Guido van Rossum dc5d07d952 Different test for Unix -- rely on os.sep instead of sys.platform. 1997-09-03 23:12:18 +00:00
Guido van Rossum 2b3fd76cc7 One patch from Sjoerd and one from Jack.
Sjoerd: add separate administration of temporary files created y
URLopener.retrieve() so cleanup can properly remove them.  The old
code removed everything in tempcache which was a bad idea if the user
had passed a non-temp file into it.  (I added a line to delete the
tempcache in cleanup() -- it still seems to make sense.)

Jack: in basejoin(), interpret relative paths starting in "../".  This
is necessary if the server uses symbolic links.
1997-09-03 22:36:15 +00:00
Guido van Rossum ad87d3e826 Give in to Mike Meyer -- add *both* lib/python1.5/packages and
lib/site-python to the path (if they exist).  This is a reasonable
compromise.
1997-09-03 21:41:30 +00:00
Guido van Rossum fc6efffbf9 #Removed debug print that was accidentally left in. 1997-09-03 00:35:38 +00:00
Guido van Rossum 5ed5c4c364 Add the same _keep_alive patch (by Michael Scharff) that was added to
copy.deepcopy() a while ago.  Can't reproduce this but it doesn't
break anything and it looks like the code could have the same problem.
1997-09-03 00:23:54 +00:00
Guido van Rossum 625f40de05 #typo 1997-08-30 20:04:42 +00:00
Guido van Rossum a28dab5ea2 Write out the dynamic OS choice, to avoid exec statements.
Adding support for a new OS is now a bit more work, but I bet that
'dos' or 'nt' will cover most situations...
1997-08-29 22:36:47 +00:00
Guido van Rossum f30bec7bb2 New site.py semantics. Searches in
<*prefix>/lib/python<version>/packages for *.pth files containing
directories that are appended to sys.path.
1997-08-29 22:30:45 +00:00
Barry Warsaw 3e613ce79b New file, which is imported by the built-in module when python is
started with the -X option.  This file contains the definitions for
the built-in exception classes.
1997-08-29 21:59:26 +00:00
Barry Warsaw 6ed41a0a87 Expanded r() function to handle class exceptions. 1997-08-29 21:58:25 +00:00
Guido van Rossum 02840fdf84 user.py -- when imported, execfile(~/.pythonrc.py). 1997-08-28 14:32:14 +00:00
Guido van Rossum e2ed9df645 Fixed bugs regarding lines starting with '.' (both receiving and sending).
Added a minimal test function.
1997-08-26 23:26:18 +00:00
Guido van Rossum ab0abdcef8 Explicitly close the socket and temp file in URLopener.retrieve(), so
that multiple retrievals using the same connection will work.

This leaves open the more general problem that after
    f = urlopen("ftp://...")
f must be closed before another retrieval from the same host should be
attempted.
1997-08-26 19:06:40 +00:00
Barry Warsaw 09f9547393 regression test for new sequence unpacking semantics 1997-08-25 22:17:45 +00:00
Barry Warsaw 9525df03bf Output for sequence unpacking test 1997-08-25 22:15:22 +00:00
Barry Warsaw 558f66ff53 Added a few more tests of exception class raising 1997-08-22 21:28:05 +00:00
Barry Warsaw ac405ce3f9 generated output for new tests 1997-08-22 21:27:40 +00:00
Barry Warsaw d543077aa6 Added tests of the new builtin functions issubclass() and isinstance() 1997-08-22 21:27:03 +00:00
Guido van Rossum b6784dc53f Interpret three slashes in file: URL as local file (for Netscape on
Windows/Mac).
1997-08-20 23:34:01 +00:00
Guido van Rossum 558be283bf Make sure the objects returned by __getinitargs__() are kept alive (in
the memo) to avoid a certain kind of nasty crash.  (Not easily
reproducable because it requires a later call to __getinitargs__() to
return a tuple that happens to be allocated at the same address.)
1997-08-20 22:26:19 +00:00
Guido van Rossum a412220bbf Change default verbosity so that there are only three levels left: -q,
default and -v.  In default mode, the name of each test is printed.
-v is the same as the old -vv.  -q is more quiet than the old default
mode; that's fine I think.
1997-08-18 20:08:24 +00:00
Guido van Rossum e7038425b1 Tweaks to cope with strftime returning 0 without error for %Z 1997-08-18 15:37:38 +00:00
Guido van Rossum f07eaea134 Forgot to check in the fixed output for print 1997-08-18 15:36:05 +00:00
Guido van Rossum 9918e0c750 Add missing comma to make a tuple of (tagOrId). 1997-08-18 14:44:04 +00:00
Guido van Rossum ce32096661 Oops. Of course, print b should also be print `b`. :-( 1997-08-18 13:42:28 +00:00
Guido van Rossum c95a6c1af5 Use imp.find_module() as the most certain way to find the test data. 1997-08-15 16:23:32 +00:00
Jeremy Hylton 57fa217b01 generated by regrtest.py -g 1997-08-15 16:00:02 +00:00
Jeremy Hylton 6eb4b6a0bd test the zlib module
only produce output if somethign goes wrong
1997-08-15 15:59:43 +00:00
Guido van Rossum cf00505325 Added tests for \b, \B (AMK). 1997-08-15 15:44:58 +00:00
Guido van Rossum 827ea7cf5d Last minut changes for \B, \S (?). AMK. 1997-08-15 15:44:23 +00:00
Guido van Rossum ff712aa8ab The usual. 1997-08-15 00:45:26 +00:00
Guido van Rossum 2b41fdccd3 Moved some non-standard format characters out of the standard list.
Also moved %c and %Z out of there, even though they are standard,
because these are locale dependent (and e.g. on Windows and Mac they
return different strings).  Finally, sorted the tables slightly
different, to match my standard docs better (%a before %A).
1997-08-14 22:23:42 +00:00
Guido van Rossum c4d6c4d950 OK, reop is safe again. 1997-08-14 21:23:07 +00:00
Guido van Rossum 5526e394a2 set LOOPS to 10000 1997-08-14 20:14:12 +00:00
Guido van Rossum c4c26414c5 Print `a` so encrypted text is shown in ascii, not binary. 1997-08-14 19:55:00 +00:00
Guido van Rossum e83870131b Don't call sys.exit() all over the place -- simply return the exit
status from main() and call sys.exit(main()) in the startup stub at
the end of the file.
1997-08-14 19:40:34 +00:00
Guido van Rossum 257c772afa Comment out use of reop.expand_escape and reop._expand until their
bugginess has been fixed.
1997-08-14 19:33:06 +00:00
Guido van Rossum 1530c87985 Fred Lundh's latest versions. 1997-08-14 14:17:28 +00:00
Guido van Rossum f53c86c2b6 Add dummies for create/delete filehandles, just so that vanilla Grail
0.3 won't break on Windows.
1997-08-14 14:15:54 +00:00
Guido van Rossum 88bb808d77 Fixed (and documented, see Doc/libmimify.tex) mime_decode_header() and
mime_encode_header().
1997-08-14 14:10:37 +00:00
Guido van Rossum 95e8053a9f 1.5a3 prerelease 1 from AMK 1997-08-13 22:34:14 +00:00
Guido van Rossum 6dc61b110f Add try-finally to close the file after loading it in
ModuleLoader.load_module!  (Thanks to Daniel Larsson who complained
about this.)
1997-08-13 14:48:36 +00:00
Guido van Rossum 6af4abdba0 Various changes by AMK, e.g. remove \e, \cX, add \v 1997-08-13 03:25:34 +00:00
Guido van Rossum f55afae3c6 New dialog from Fred Lundh 1997-08-12 18:21:21 +00:00
Guido van Rossum 9d9af2c7a8 Fixes for the Mac. (Jack) 1997-08-12 18:21:08 +00:00
Guido van Rossum a5e9fb6a65 Changes suggested by Jim fulton:
- Moved most imports to the top, for faster loadingf when using ni.
- Always open the temp file in binary mode.
1997-08-12 18:18:13 +00:00
Guido van Rossum ca54982b2a Added TemporaryFile and wrapper class by Jim Fulton.
Look in more env vars (for NT: TEMP, TMP).
1997-08-12 18:00:12 +00:00
Guido van Rossum d510b72fff Allow paths without drive specifier (Jack). 1997-08-12 14:47:24 +00:00
Guido van Rossum e2ad88c202 Rewrite normcase() using string.translate... 1997-08-12 14:46:58 +00:00
Guido van Rossum efa683726f Treat all HTTP/1.* versions the same. 1997-08-12 14:46:13 +00:00
Guido van Rossum 2567dd6d44 Two changes:
(1) No longer close self.sock; close it on close().  (Guido)

(2) Don't use regular expressions for what can be done simply with
string.split() -- regex is thread unsafe.  (Jeremy)

(3) Delete unused imports.  (Jeremy)
1997-08-11 21:52:17 +00:00
Guido van Rossum 0357d02eab Rewrite using class, to make waiting for processes possible;
by default children are waited for automatically.
1997-08-11 03:27:24 +00:00
Guido van Rossum 570278be6e Add test for function comparisons 1997-08-05 16:52:50 +00:00
Guido van Rossum d6615ab30c Get READABLE c.s. from _tkinter instead of conditional definition.
in Tk.destroy(), reset _default_root to None when it is us.
1997-08-05 02:35:01 +00:00
Guido van Rossum 7995ed204a The reload(sys) test no longer works due to changes in the import
semantics.
1997-08-02 03:19:26 +00:00
Guido van Rossum 74d25e7d8a Mention decode_base64 in example. 1997-07-30 22:02:28 +00:00
Guido van Rossum 9a876a4500 Tweaks by Lars Wirzenius to parse some more forms of illegal dates:
the comma after the day name is optional if it is a recognized day
name; and the date and month may be swapped.  Thus, the following two
test dates will now be parsed correctly:
	Thu, Feb 13 12:16:57 1992
	Thu Feb 13 12:16:57 1992
1997-07-25 15:20:52 +00:00
Guido van Rossum 4e5cbcf5af Added createmessage() -- Lars Wirzenius. 1997-07-25 14:59:10 +00:00
Guido van Rossum 2e2525fd3c Patch by Lars Wirzenius to allow f.readline(length). 1997-07-25 14:56:01 +00:00
Guido van Rossum ed57d7663e Regenerated; __assert__ becomes assert. 1997-07-23 18:10:52 +00:00
Guido van Rossum 68de37973f Add the option to pass an open file object to GzipFile. This obviates
the need for the StringIO subclass.
1997-07-19 20:22:23 +00:00
Guido van Rossum 64c6620934 Add optional 'quote' flag argument to escape(); if true, translate '"'
to '&quot;'.
1997-07-19 20:11:53 +00:00
Guido van Rossum 1e8c8a20f2 New dialog routines (Fred Lundh) 1997-07-19 20:02:36 +00:00
Guido van Rossum 65c78e18b5 Use dictionary's update() method in _cnfmerge(). 1997-07-19 20:02:04 +00:00
Guido van Rossum c864ad695f Nit: round delays to 0.1 second. 1997-07-18 23:50:22 +00:00
Fred Drake e0ffabe375 Slight mods to make the module conform to the documentation. 1997-07-18 20:42:39 +00:00
Guido van Rossum 1557a7314c Checking in new module code.py -- utilities dealing with code objects.
Currently, contains one function: compile_command(), which helps
determining whether a source string is complete, incomplete or in
error.  This is useful when writing your own version of the Python
read-eval-print loop.
1997-07-18 16:57:52 +00:00
Guido van Rossum f357d3ef52 This module is now completely obsolete.
Noted this in the XXX comments.
Also, changed all three functions to use the attributes if they exist.
1997-07-18 16:48:30 +00:00
Guido van Rossum c444865994 No longer need to use codehack -- use co.co_firstlineno instead. 1997-07-18 16:47:40 +00:00
Guido van Rossum 2deb73a961 Use sys.exc_info() instead of sys.exc_{type,value,traceback}.
Also corrected a typo in format_stack (t should've been f).
1997-07-18 16:46:36 +00:00
Guido van Rossum 4994657c5f Some new tests by Jeffrey 1997-07-18 04:26:25 +00:00
Guido van Rossum 71fa97c60d Jeffrey's latest -- reorder my chages somewhat,
removed some of his own cruft.  Added \g<...> references in replacement text.
1997-07-18 04:26:03 +00:00
Guido van Rossum 9e18ec7dc9 Correctly implement sub, subn, and split. Also correct and augment
the cache code.
1997-07-17 22:39:13 +00:00
Guido van Rossum a4f1a78b6e Jeffrey's next installment 1997-07-17 22:38:10 +00:00
Guido van Rossum 32d6f3c0ce Corresponding output. 1997-07-17 22:37:07 +00:00
Guido van Rossum 06c0ec94e4 Several additions from Jeffrey. 1997-07-17 22:36:39 +00:00
Guido van Rossum 23b225741c Added tests for sub, subn, and split. 1997-07-17 22:36:14 +00:00
Guido van Rossum c3fb88be8b Fix xover implementation according to Fred Lundh. 1997-07-17 15:21:52 +00:00
Guido van Rossum a0e4c1bffc Jeffrey's latest -- seems to solve most problems! 1997-07-17 14:52:48 +00:00
Guido van Rossum 75fce308bc Add flush() method to fake file. 1997-07-17 14:51:37 +00:00
Guido van Rossum db2b70cb99 Fix bug found by kjpylint; change doc string to avoid "(" in column 1. 1997-07-16 16:21:38 +00:00
Guido van Rossum 9e48b272b9 Catch all exceptions in test modules. 1997-07-16 01:56:13 +00:00
Guido van Rossum 65cd989441 Added output from new tests. 1997-07-15 19:01:38 +00:00
Guido van Rossum 9ddd9dad80 Fixed a syntax error caused by a bad line in the Perl source. 1997-07-15 19:01:04 +00:00
Guido van Rossum 26d80e6714 Correct inf. while loop. 1997-07-15 18:59:04 +00:00
Guido van Rossum e8b81313db Merged Jeffrey's changes in. 1997-07-15 18:47:48 +00:00
Guido van Rossum 16bd0ff16a Merged my changes in, and added all converted Perl tests. 1997-07-15 18:45:20 +00:00
Guido van Rossum 337c6d41d4 Jeffrey's version 1997-07-15 18:42:58 +00:00
Guido van Rossum 9f845ec64b More changes by Jeffrey. 1997-07-15 18:11:42 +00:00
Guido van Rossum 23b8d4c15e Tweak re_tests and test_re to differentiate between
groups that have no value and groups that are out of bounds.
1997-07-15 15:49:52 +00:00
Guido van Rossum 847ed4afb5 More tweaks; re.py is nearly there... 1997-07-15 15:40:57 +00:00
Guido van Rossum 531097502c Fix group() -- should be tuple even when re has exactly one group. 1997-07-15 15:40:29 +00:00
Guido van Rossum 09bcfd649a Jeffrey's latest -- almost there. 1997-07-15 15:38:20 +00:00
Guido van Rossum 04a1d74229 Jeffrey's newest 1997-07-15 14:38:13 +00:00
Guido van Rossum 70f107f63d Three fewer incorrect failures 1997-07-15 02:49:15 +00:00
Guido van Rossum 7449540986 After some discussion with Jeremy and Fred, decided to limit the
default urlparse cache size to 20 instead of 2000.  The main use of
the cache seems to be to gain some speed in Grail, which is calling
urljoin with the same base for each anchor.  2000 is a bit too big for
Jeremy, who doesn't need the cache at all.  20 should keep at least
95% of the Grail speedup while wasting an insignificant amount of
memory in Jeremy's application.
1997-07-14 19:08:15 +00:00
Guido van Rossum 1d8b7583dc Removed the traceback output in non-verbose mode 1997-07-11 21:14:53 +00:00
Guido van Rossum 5d6de256d5 New from Jeffrey; small nits. 1997-07-11 21:10:17 +00:00
Guido van Rossum 8a9a4a2336 Jeffrey's latest. 1997-07-11 20:48:25 +00:00
Guido van Rossum 035aae0f09 Some small nits. 1997-07-11 20:47:58 +00:00
Guido van Rossum 185147f1d0 Test urlparse cache with try/except instead of has_key.
This makes it thread-safe again.
1997-07-11 20:13:10 +00:00
Guido van Rossum 7ffbd2f86c This is pretty pathetic and full of errors,
but it makes the regression test not complain about test_re.
1997-07-11 19:43:46 +00:00
Guido van Rossum 8e0ce30ce4 test suite for re.py 1997-07-11 19:34:44 +00:00
Guido van Rossum 105bd989e3 Added /usr/bin/env python and made executable. 1997-07-11 18:39:03 +00:00
Guido van Rossum e3cd151d1f Use the modules base64, quopri, and uu, instead of external programs
to decode/encode the standard transfer encodings.
1997-07-11 16:33:26 +00:00
Guido van Rossum 9e1ee9715e Support for conditional breakpoints (Jim Fulton, with some changes). 1997-07-11 13:43:53 +00:00
Guido van Rossum 668361766a Normalize whitespace. 1997-07-11 13:43:31 +00:00
Guido van Rossum ff02e1ddde Support for conditional breakpoints (Jim Fulton). 1997-07-11 13:42:50 +00:00
Guido van Rossum 65c28b7efb Removed debug print in set construction.
Changed some '==' to 'in' (Tim Peters).
1997-07-11 11:10:44 +00:00
Guido van Rossum 63e18195b8 New version from Jeffrey after I complained about some glaring bugs. 1997-07-11 11:08:38 +00:00
Guido van Rossum 5ca1b711b5 Straight from Jeffrey Ollie's web page. 1997-07-10 21:00:31 +00:00
Guido van Rossum d247812521 Two improvements suggested by Tim Peters: speed up random() since we
know Python integers are at least 32 bits long; and avoid zeros in
initial seed value.
1997-07-10 15:14:50 +00:00
Fred Drake 475d51d7b2 Wrapped up the ~/.netrc support. This is basically just the changes Guido &
I discussed to the original version way-back-when.
1997-06-24 22:02:54 +00:00
Fred Drake bcdb9403d4 Added docstrings by Sue Williams, re-indented to 4 spaces / level. 1997-06-12 16:17:00 +00:00
Guido van Rossum d9c6f4fd7d Allow oct() result for 64-bit machines. 1997-06-06 21:14:14 +00:00
Guido van Rossum 914c938cc5 Use cPickle and cStringIO when available. 1997-06-06 21:12:45 +00:00
Guido van Rossum f668d17e01 Clear the ftp cache when it contains more than 10 entries. 1997-06-06 21:11:11 +00:00
Guido van Rossum 2966b32205 Catch *all* errors that ftplib can raise (ftplib.all_errors) rather
than just the four.

Also folded some long lines.
1997-06-06 17:44:07 +00:00
Guido van Rossum 2b1566be9d Correct typo in last line (test program invocation). 1997-06-03 22:05:15 +00:00
Guido van Rossum 876736cd0d AMK's regex test suite 1997-06-03 18:07:49 +00:00
Fred Drake cf3527b705 socket_type --> SocketType 1997-06-03 17:58:31 +00:00
Guido van Rossum c24751b57a Add Host: header to URL request. 1997-06-03 14:34:19 +00:00
Guido van Rossum b94cd96977 Fix bug in copy() by using copy.copy() instead of making assumptions
(it so happens that copy.copy() works fine for the base UserDict
type).  Also reindented the entire module to have 4-space indents.
1997-06-03 14:10:01 +00:00
Fred Drake bd40d7e69f Added the new dictionary methods to the wrapper class. 1997-06-03 13:07:59 +00:00
Guido van Rossum 2d3aac2377 The usual 1997-06-02 23:14:37 +00:00
Guido van Rossum ce1fa263e6 Added tests for dict.clear(), dict.update(), dict.copy(). 1997-06-02 23:14:00 +00:00
Guido van Rossum 77e1db3b34 Support $HOME in expanduser().
(Who'd thought that *anyone* would be interested in writing ~/foo on NT :-)
1997-06-02 23:11:57 +00:00
Barry Warsaw 1d0fe31d7e Packer.pack_uhyper(): Fixes needed to properly pack unsigned 64 bit
longs where the top bit is set.  First, change the masks so that they
are `L' longs, otherwise the sign bits will get propagated to the
result.  Next, do not coerce to int before sending to pack_uint()
otherwise Python will generate an OverflowError.  Here is a test
program that fails without the patch, but now succeeds:

import xdrlib

addr = (132, 151, 1, 71)
uint = 0L
for a in addr:
    uint = (uint << 8) | a

ulong64 = uint << 32

p = xdrlib.Packer()
p.pack_uhyper(ulong64)
buf = p.get_buffer()
u = xdrlib.Unpacker(buf)
ulong64prime = u.unpack_uhyper()

if ulong64 == ulong64prime:
    print 'okay'
else:
    print 'bogus'

print ulong64, ulong64prime
1997-05-29 21:01:35 +00:00
Guido van Rossum f7cea10f80 Remove '(' in column 0 of doc strings.
Add dependency on dict.copy().
1997-05-28 19:31:14 +00:00
Guido van Rossum d7c9d96d3e Tweak default source of query a bit so it is possible to invoke
a CGI script from the command line with not environment variables.
1997-05-28 15:39:15 +00:00
Guido van Rossum 1aec3f087e lowercase proxies env variables, for Windows. 1997-05-28 15:37:19 +00:00
Guido van Rossum 4305542517 Reworded the doc string to remove the need for The Emacs font-lock kludge.
This required (re)moving all occurrences of '(' in column 0, as well
as changing "#!" to #!.
1997-05-28 15:11:01 +00:00
Fred Drake c8296db67d Widget._setup(): Support name=None in a similar way to the handling of other
Tkinter keyword parameters.
1997-05-27 22:45:10 +00:00
Guido van Rossum f1e6354548 The usual 1997-05-22 20:48:03 +00:00
Guido van Rossum d6a111e2dd Fix for boundary case (Jack) 1997-05-21 14:59:17 +00:00
Guido van Rossum f8580215c1 Add test for presence of socket_type. 1997-05-21 14:38:57 +00:00
Guido van Rossum 05ba2ab720 Fix ratecv test (Sjoerd). 1997-05-21 14:27:20 +00:00
Guido van Rossum 462d6e6484 More robust way of choosing a non-existant uid (faster, too).
(Correct version -- the previous checkin was a keyboard slip.)
1997-05-20 19:32:22 +00:00
Guido van Rossum 6308d510e9 More robust way of choosing a non-existant uid (faster, too). 1997-05-20 19:31:25 +00:00
Guido van Rossum 72be30690f Added some minimal comments and tweaked lay-out a bit. 1997-05-20 18:03:22 +00:00
Guido van Rossum 32f92caa98 Handling of pathnames pointing to files on toplevel folder of disk was
incorrect (Jack)
1997-05-20 16:00:07 +00:00
Guido van Rossum 3f11da0aaf Changes to make these tests work on the Mac. 1997-05-16 13:51:48 +00:00
Guido van Rossum 9522274205 Increase the child's sleep time to 5 for slow machines. 1997-05-16 13:40:41 +00:00
Barry Warsaw 4c4d5ce78a Catch nis.error and raise TestFailed instead. This catches the
problem where Python is configured with the nismodule but NIS isn't
installed, or the map names don't correspond to those hardcoded in
nismodule.c (which is bogus in and of itself).
1997-05-15 18:27:49 +00:00
Guido van Rossum fdf58fe59a Added BabylMailbox class by Fred Lundh (untested). 1997-05-15 14:33:09 +00:00
Guido van Rossum 4dfd458611 Fix typo in error reporting. 1997-05-14 21:38:03 +00:00
Guido van Rossum c1c96d1b5c Fix hex tests for 64-bit machines. 1997-05-14 21:37:23 +00:00
Guido van Rossum 2b4d2800af Suppress fork part of socket test when we can't fork. 1997-05-14 21:12:51 +00:00
Guido van Rossum 4a0694d235 Fix sys.platform test -- on Win, it is 'win32', not 'win'. 1997-05-14 19:06:36 +00:00
Guido van Rossum 0ba7e5958c More rational implementation of get_qualified_path() -- search along
sys.path instead of assuming __file__ works.
1997-05-14 18:57:21 +00:00
Guido van Rossum ad16471b27 Untested changes by Skip Montanaro to have an optional limit on the
size of uploads to POST (new version of these patches).
1997-05-13 19:03:23 +00:00
Guido van Rossum 725a67e5c2 Regenerated on newer Solaris version 1997-05-13 17:45:56 +00:00
Guido van Rossum 0e351f34c5 Finally found a wat to set a file nonblocking that works on Irix,
Solaris and Linux: use os.O_NONBLOCK.
1997-05-12 22:15:52 +00:00
Guido van Rossum d0f2372cb9 Modernized for 1.5 1997-05-09 03:21:44 +00:00
Guido van Rossum 57c30f6f37 Regenerated on a newer Linux version. 1997-05-09 02:21:06 +00:00
Guido van Rossum 16dffdca1a Fix the NDELAY test; avoid outputting binary garbage. 1997-05-09 02:06:05 +00:00
Guido van Rossum f518d5e98e Print less in test_socket. 1997-05-09 01:54:45 +00:00
Guido van Rossum 16cd332aab Add root.tkraise() to the _test() program so the window doesn't hide
behind the shell window on NT.
1997-05-09 00:59:43 +00:00
Guido van Rossum de554ece41 The usual. 1997-05-08 23:14:57 +00:00
Guido van Rossum 6dd87830d0 Improve getting the mailbox from the environment. 1997-05-08 23:11:52 +00:00
Guido van Rossum 56f78d9e3c Set correct RFC number. 1997-05-08 23:11:04 +00:00
Guido van Rossum 25107deb9f Set correct RFC number. Open input in binary. 1997-05-08 23:10:42 +00:00
Fred Drake 526749b678 Misc.__init__(): Removed method, replaced with class attribute (which
was all that the method set anyway).  Removed calls to the
	constructor.  This reduces the number of Python function calls
	per widget construction by one, for every widget construction.
1997-05-03 04:16:23 +00:00
Guido van Rossum 1526219431 Adding Jeremy Hylton's gzip module.
This requires Andrew Kuchling's zlib extension module.
It still needs some doc strings.
1997-04-30 16:04:57 +00:00
Guido van Rossum 9d0a3dfa3d Transformed comments to doc strings.
Added symlinks option to copytree.
1997-04-29 14:45:19 +00:00
Guido van Rossum a2baf46c89 Reindented at 4 spaces. 1997-04-29 14:06:46 +00:00
Guido van Rossum 5980845bd5 Add feature to copy(), copy2(): dst may be a directory.
Remove unneeded check for '.' / '..' from copytree().
Add some comments.
1997-04-29 14:06:05 +00:00
Guido van Rossum 277206b08e Improvements to copyfile(): open the files in binary mode, and close
them in a finally clause.
1997-04-29 13:08:15 +00:00
Guido van Rossum 8be9a11617 Restore two features of the original 1.4 pickle:
- which_module() search __main__ last;

- load_inst() no longer checks that the classname really refers to a class.
1997-04-25 19:52:29 +00:00
Guido van Rossum faeae5cd78 Alas, I have to restore 'marshal', since it is needed by the new
cPickle-compatible pickle, and pickle must be importable in restricted
mode.  I guess I'll have to make marshal safe.
1997-04-25 19:10:15 +00:00
Guido van Rossum caa9f234bc Change inspired by Tommy Burnette to add an interface to get stderr, too. 1997-04-21 14:15:55 +00:00
Fred Drake 5fd026dc5e Fix a couple of glitches identified by Greg Stein. 1997-04-18 13:54:13 +00:00
Fred Drake f39d0516b4 _safe_repr(): Make the context parameter required; ok since it's only for
internal use.  Make sure the maxlevels and level parameters get
	passed to recursive invocations.
1997-04-16 18:55:58 +00:00
Fred Drake a89fda0fe2 Muchly changed and improved pprint.py:
- handles recursive data structures
	- formatting based on a PrettyPrinter object
	- allows a maximum nesting depth to be specified
	- provides safe repr()-like function which does not pretty-print
1997-04-16 16:59:30 +00:00
Guido van Rossum ab0d1afdf3 spliturl() should not throw away everything past first newline 1997-04-16 15:17:06 +00:00
Guido van Rossum 0c5e049c75 Reindented with 4 spaces. 1997-04-16 02:47:12 +00:00
Guido van Rossum 7cfd31ee8a Rewrite parsesequence() to emulate MH without invoking pick.
Test it extensively by using pick.
1997-04-16 02:45:08 +00:00
Guido van Rossum 5e92affc54 Checking in a copy of Fred Drake's data structure pretty-printer
(with some slight formatting changes).

Feature requests:

- Make it a class (everything should be a class);

- support recursive data structures (like pp.py on the ftp contrib site).
1997-04-16 00:49:59 +00:00
Guido van Rossum 7aa9fc5642 Use uuencoded test images. 1997-04-16 00:30:45 +00:00
Guido van Rossum 684480f419 Soft failure for Win32 and Mac platforms. Less output unless verbose. 1997-04-16 00:29:59 +00:00
Guido van Rossum cc5a91dc4f Soft failure for Win32 platform. 1997-04-16 00:29:15 +00:00
Guido van Rossum 505043f35e No need to define assert, it's built in. 1997-04-16 00:27:45 +00:00
Guido van Rossum 103cc6dd11 Patch by Craig McPheeters to clean up the back-references to widgets
contained in commands created by those same widgets.
1997-04-14 13:30:24 +00:00
Guido van Rossum 5a56649e09 Remove Digital Creations copyright (Jim sez it's okay). 1997-04-11 22:31:56 +00:00
Guido van Rossum 62bd30c430 Catch and report ValueError raised by strftime. 1997-04-11 22:26:42 +00:00
Guido van Rossum 54a1d0bc69 (Jack+Guido:) interpret ../ in basejoin() according to RFC1808. 1997-04-11 19:09:51 +00:00
Guido van Rossum c511aee0e3 Open files in binary mode. 1997-04-11 19:01:48 +00:00
Guido van Rossum f4f756cf55 (Jack:) Better MacOS support. 1997-04-11 19:00:53 +00:00
Guido van Rossum 9e3307494d (Jack:) Recognize PNG files. 1997-04-11 18:59:38 +00:00
Guido van Rossum 5f32248d56 From: Clarence Gardner <clarence@king.silcom.com>
The function parse_qs currently calls urllib.unquote on the
value of the field submitted, but not on the name.  It needs
to do both.
1997-04-11 18:20:42 +00:00
Guido van Rossum a3d9e02593 base64 support by Sjoerd. 1997-04-11 15:22:56 +00:00
Guido van Rossum cb5cf9b186 Use uuencoded test images. 1997-04-09 21:25:01 +00:00
Guido van Rossum cee1dd3f9d Don't just die when an error is not defined; print a warning instead.
This for errno-challenged platforms like Windows.
1997-04-09 21:02:17 +00:00
Guido van Rossum a6ed2254e1 Try calling getpid() from /usr/lib/libc.so instead of some other
random things.
1997-04-09 20:57:52 +00:00
Guido van Rossum c9f8f1467e Use TESTFN instead of /etc/passwd and /dev/null as test files. 1997-04-09 20:51:54 +00:00
Guido van Rossum 47065620f2 support module for cPickle 1997-04-09 17:44:11 +00:00
Guido van Rossum b72cf2d697 New version by Digital Creations, supports binary format compatible
with cPickle.
1997-04-09 17:32:51 +00:00
Guido van Rossum de65527e4b Ping's latest. Fixes triple quoted strings ending in odd
#backslashes, and other stuff I don't know.
1997-04-09 17:15:54 +00:00
Guido van Rossum 3ccd2f153f while (1) -> while 1. Sorry. 1997-04-08 19:46:53 +00:00
Guido van Rossum 2ebaa1796e Search for a valid begin line instead of requiring the first line. 1997-04-08 19:46:02 +00:00
Guido van Rossum 1aec32363f Ka-Ping's muich improved version of March 26, 1997:
#     Ignore now accepts \f as whitespace.  Operator now includes '**'.
#     Ignore and Special now accept \n or \r\n at the end of a line.
#     Imagnumber is new.  Expfloat is corrected to reject '0e4'.
1997-04-08 14:24:39 +00:00
Guido van Rossum 228b8e88bc Whole lotta changes. 1997-04-02 06:13:34 +00:00
Guido van Rossum 21aa0ef351 Changed my mind on replace().
It's now replace(str, old, new, maxsplit=0).
Note new ordering of parameters (string first);
this is more consistent with translate().
1997-04-02 05:49:46 +00:00
Guido van Rossum aa925a5efd Add #! line. 1997-04-02 05:47:39 +00:00
Guido van Rossum ab096c91e2 New doc strings. 1997-04-02 05:47:11 +00:00
Guido van Rossum fd79566d0f Fix two small bugs with proxies. 1997-04-02 05:46:35 +00:00
Guido van Rossum a9a3575e26 New symbols due to assert statement. 1997-04-02 05:46:05 +00:00
Guido van Rossum c1a4ba97b7 New test output for test_builtin 1997-04-02 05:44:51 +00:00
Guido van Rossum 659a3b5881 Optimized the hell out of listmessages().
Changed numericprog regexpr to make it faster to check.
Removed now unnecessary checks for os.curdir, os.pardir.
1997-04-02 01:18:30 +00:00
Guido van Rossum dddf7a6fb4 Added test of complex() (that catches a bug in 1.4!).
Added test that ensures that int() and long() truncate float numbers
towards zero.
1997-03-31 17:13:17 +00:00
Guido van Rossum bfc3944bfd Change by Andrew Kuchling (edited by Guido):
Removed unused import tempfile.

Added some docstrings.
1997-03-25 21:58:08 +00:00
Guido van Rossum 1eb9a81eb9 Added new functions replace() and replace1(). 1997-03-25 16:50:31 +00:00
Roger E. Masse 4fc7067055 Added a 'sync' method to shelve. If the underlying database does not have a sync
attribute, this method silently ignores this fact.  The default (bsddb's dbhash) does.
1997-03-25 16:06:03 +00:00
Guido van Rossum 3ee6b195bb Removed 'marshal' from the list of "ok" built-in functions -- the
unmarshalling code is actually rather naive and can easily be
caused to crash by feeding it invalid data.  This should be fixed in
the marshal module, but I don't have the time to fix it now :-(
1997-03-21 21:18:16 +00:00
Guido van Rossum 4d81984011 Ping's new version -- more efficient at finding the keywords. 1997-03-20 20:40:45 +00:00
Guido van Rossum 3d99e35884 Added __assert__. 1997-03-20 19:46:41 +00:00
Guido van Rossum eb8c972648 Ka-Ping Yee's version is better:
Here's a "keyword" module which, in the spirit of "token.py", updates
the list of keywords automatically from a source file (in this case,
"graminit.c" seemed like a reasonable choice, easier than "Grammar/Grammar").

You get "kwlist", a sorted list of keywords; "kwdict", a dictionary
mapping each keyword to 1; and "iskeyword", a function which tells
you if a given string happens to be a keyword.
1997-03-20 19:45:51 +00:00
Guido van Rossum 90d556fb6e Simple module to publish list of Python keywords. 1997-03-20 19:44:30 +00:00
Guido van Rossum f789ee4a86 Avoid crashes with nested multipart/mixed parts. 1997-03-20 14:42:17 +00:00
Guido van Rossum efd3a3a843 Implement find_class() without exec statement. 1997-03-14 04:21:10 +00:00
Guido van Rossum c69955343c Change the list() function to match the documentation in the comment
(it should return a list of tuples, not a list of lists).
1997-03-14 04:18:20 +00:00
Guido van Rossum 56d1e3a517 Added Fred Drake's netrc parser class. 1997-03-14 04:16:54 +00:00
Guido van Rossum 18aef3c102 Support disassembly of a variety of objects through dis.dis(). 1997-03-14 04:15:43 +00:00
Guido van Rossum 7b7c578616 Add optional 4th argument to [r]find and [r]index (end of slice). 1997-03-14 04:13:56 +00:00
Fred Drake ef8dc06c01 compile(): Use the __debug__ flag to determine the proper filename extension
to use for the cached module code object.
1997-03-13 14:13:16 +00:00
Guido van Rossum b5dc5e3d7e Added support for imaginary constants (e.g. 0j, 1j, 1.0j). 1997-03-10 23:17:01 +00:00
Guido van Rossum 27e280dc77 Restore old behavior of autotest and testall, using regrtest.
This is done for backward compatibility with Python 1.4.
1997-03-07 21:05:43 +00:00
Guido van Rossum f58ed25967 Add "extra-verbose" mode, triggered by specifying two -v flags. In
this mode, all tests are run in verbose mode with their output to
stdout.  No comparing of output is done.
1997-03-07 21:04:33 +00:00
Guido van Rossum e69be3eb93 Much more rigorous testing -- we now try many times, varying in time
of day, day of week, and season.

Fix the weekday predictions -- these seemed to be all bogus.  The new
predictions seem to correspond with strftime() on Solaris and IRIX, so
I believe they are correct.

Get rid of the test for non-standard format %C returning "the same as
date(1)".  This is hard to do reliably without opening a pipe to date,
and moreover, on IRIX 6.2, %C yields the Century.  So we use that
instead.  (We don't complain about this in non-verbose mode anyway.)
1997-03-07 20:30:03 +00:00
Guido van Rossum b51eaa183e Fixed doc string, added __version__, fixed 1 bug. 1997-03-07 00:21:55 +00:00
Guido van Rossum fc6f5339a9 Ka-Ping's version. 1997-03-07 00:21:12 +00:00
Guido van Rossum 2a0711d8db Removing this -- complex numbers are now builtin,
and there is already a similar demo in Demo/classes/Complex.py.
1997-02-23 05:37:36 +00:00
Guido van Rossum ad183bbfe6 Removed nonstandard strftime formats (strftime is tested more
extensively in test_strftime.py anyway).
1997-02-20 16:23:01 +00:00
Guido van Rossum 78016145d6 Remove some bogus code that would cause a NameError if a -r option was passed. 1997-02-19 20:07:38 +00:00
Guido van Rossum 13ddde0653 Remove %n and %t from the list of standard expectations. 1997-02-19 16:25:52 +00:00
Barry Warsaw 19302de7a0 join(): Wax the incorrect leading comment 1997-02-18 22:06:21 +00:00
Barry Warsaw 384d249006 join(): join one or more path components 1997-02-18 21:53:25 +00:00
Barry Warsaw b67a25c079 Store the current regex syntax along with the regular expression
string as the key to the cache.  This means that changing the syntax
will return the correct compiled pattern.

clear_cache(): New function.
1997-02-18 18:52:55 +00:00
Guido van Rossum 152f9d9663 Put back #! /usr/local/bin/python. For cgi scripts, /usr/bin/env is
unlikely to find a python binary, as /usr/local/bin is usually not on
the default search path.
1997-02-18 16:55:33 +00:00
Guido van Rossum 9580609ba3 Require _tkinter -- don't attempt to import tkinter when _tkinter does
not exist.  All 8 uses of tkinter are replaced with _tkinter.  Still
create a variable tkinter though, because that is used by other
modules importing Tkinter (e.g. tkinter.createfilehandler()).

Also added a comment to the 'import _tkinter' line saying that if this
fails, Python is not configured correctly.
1997-02-15 18:33:24 +00:00
Guido van Rossum 764d6c7acd Gave the Listbox selection methods their correct (longer) names.
Removed select_adjust -- Tk no longer supports this.
1997-02-14 16:21:16 +00:00
Guido van Rossum c8504e2764 Added test for ratecv (from Sjoerd, reformatted). 1997-02-14 15:58:00 +00:00
Guido van Rossum 17ca992818 Put support for a cnf dictionary back in, since it is still supported
by all true Tkinter widgets.  (Not that I *like* this module -- it
stinks, but until I have something better, I can't nuke it.)
1997-02-12 16:49:57 +00:00
Guido van Rossum 50b82e8e18 Merged in Jack's fixes. This brings some lines beyond 79 chars again;
I'll clean that up later.  Also corrected a mistake introduced by the
previous reformatting: an 'else' belonging to a 'for' was accidentally
reindented to belong to the 'if' inside the 'for'.  Note that the
module uses inconsistent indentation -- most code is indented with 8
spaces, but some of the reformatted code uses 4 spaces.  I'll fix this
later in the promised cleanup pass.
1997-02-11 16:39:31 +00:00
Guido van Rossum 838cb28290 Put a new, more useful, set of references in the leading comment. 1997-02-10 17:51:56 +00:00
Guido van Rossum d23d9409f3 Move the 'import os' in URLopener.cleanup() to inside the block
guarded by 'if self.tempcache', to reduce the likelihood of this
causing an exception when invoked during __del__...
1997-01-30 15:54:58 +00:00
Guido van Rossum bbf8c2fafd Skip Montanaro's robots.txt parser. 1997-01-30 03:18:23 +00:00
Guido van Rossum fc167c6ba2 Did nobody ever notice that "make test" didn't print the summary line
any more?  This was because the *parent* process in test_socket.py did
an os._exit(0)!  Getting rid of that now...
1997-01-29 16:03:45 +00:00
Guido van Rossum 866016b92d new.code() has grown another foot, eh, another two arguments. 1997-01-27 23:25:37 +00:00
Guido van Rossum 73e122f563 Fix splitext() to go up to the last dot, not the first. 1997-01-22 00:17:26 +00:00
Guido van Rossum 76f587b7f8 Avoid traceback in selection_own_get() when no Tk widget owns the
selection; return None instead.
1997-01-21 23:22:03 +00:00
Guido van Rossum 04f2b453bb Version 1.1. Fix memory leak and expensive comparison with None. 1997-01-18 02:20:37 +00:00
Guido van Rossum e9fd28dae5 Add stacksize argument to new.code(). 1997-01-17 21:12:06 +00:00
Guido van Rossum 00f86e6086 Of course, when the type of the argument to dis() is unsupported, it
should raise TypeError, not ValueError...
1997-01-17 20:08:18 +00:00
Guido van Rossum bd30795192 More user friedly interface:
dis() still disassembles the last frame of the lats stack trace.

dis(x) disassembles x, which may be a code object, function, or method.

disassemble(co, [lasti]) disassembles a code object; the lasti
argument is now optional.

disco(...) is an alias for disassemble(...), for backward compatibility.
1997-01-17 20:05:04 +00:00
Guido van Rossum 1d1394e660 Make as sure as we can that the forked child does not return and
continue the tests.
1997-01-17 16:13:15 +00:00
Roger E. Masse 5c7e711bb1 Test output for the SGI cl C module test script. 1997-01-17 15:59:16 +00:00
Roger E. Masse 69ed964f86 Lame test script for the SGI cl C module. 1997-01-17 15:58:35 +00:00
Roger E. Masse eca63b83ac Output from test script for the bsddb C extension module. 1997-01-16 22:04:35 +00:00
Roger E. Masse 352e186749 Test script for the bsddb C extension module. 1997-01-16 22:04:10 +00:00
Roger E. Masse 3b039faf19 Minor output message change 1997-01-16 18:53:01 +00:00
Guido van Rossum d0bc9cb869 Merge several mods:
- add opcodes BINARY_LSHIFT ... BINARY_OR

- remove RESERVE_FAST

- Skip M's suggestion for displaying which comparison operator is meant
1997-01-16 18:52:24 +00:00
Roger E. Masse 469848a1ea As per GvR recomendations, remove the restriction that binhex only run on
big-endian machines.  This is done by directing the struct module's pack
and unpack methods to treat the data always in bin endian format.
This has been tested on irix (big endian) and solaris x86 (little endian)
but not yet on the mac.
1997-01-16 16:51:57 +00:00
Roger E. Masse 4852d37fdd test output for the binascii C module test script. 1997-01-16 16:44:40 +00:00
Roger E. Masse 2a1c83441d test script for the binascii C module. 1997-01-16 16:44:09 +00:00
Barry Warsaw e4d7821ea4 test is no longer needed 1997-01-16 00:13:11 +00:00
Roger E. Masse 52a6ea7b7d Opps. Added tests for the last two methods that were missing from
the test program: 'grey2rgb' and 'rgb2grey'
1997-01-15 20:58:55 +00:00
Roger E. Masse e17ec8d149 Modified to use 'rgbimg' instead of the SGI specific 'imgfile' for reading
the imagefiles and converting tham to a format suitable for imageop.  Also
added two more tests 'rgb2rgb8' and 'rgb82rgb' which remove the dependence
on the file 'greytest.rgb'.

Note: test_imgfile.py still uses 'greytest.rgb'
1997-01-15 20:07:07 +00:00
Guido van Rossum 1ce7c6fde8 Irix 6 specific files -- thanks Sjoerd! 1997-01-15 19:19:19 +00:00
Barry Warsaw bd8a91198d test(): close the pipe, just to shut up Purify. 1997-01-14 17:49:15 +00:00
Barry Warsaw 7e98bda43b Raise ConversionError instances the new fangled way, e.g.:
raise ConversionError, msg

where `msg' is passed as the argument to the constructor.
1997-01-14 17:11:02 +00:00
Barry Warsaw 7a515b9156 Output for test of the timing module 1997-01-13 23:03:54 +00:00
Barry Warsaw a6aca46fcb Test of the timing module 1997-01-13 23:03:07 +00:00
Barry Warsaw 5b456645fb Use the new regrtest harness 1997-01-13 22:54:27 +00:00
Barry Warsaw 6f332d8f35 updated the hex(-16) test since hex() of a signed literal has changed. 1997-01-13 22:36:29 +00:00
Barry Warsaw 906a5e9c68 updated the oct(-100) test since oct() of a signed literal has changed. 1997-01-13 22:36:03 +00:00
Barry Warsaw 3de721d073 Catch sunaudiodev.error on open() and re-raise TestFailed exception. 1997-01-13 20:53:46 +00:00
Barry Warsaw 59e066e73b Oops, remove debugging statements 1997-01-13 20:50:40 +00:00
Barry Warsaw b241c42192 A slightly better test of sunaudiodev module. Include the audio data
in the distribution.
1997-01-13 20:34:44 +00:00
Barry Warsaw dbfb8d4626 Rewrite the `hostname mismatch' test as per GvR suggestion.
Don't assume gethostbyaddr()'s primary hostname is the same as
gethostname(), or even that gethostname() can be found in the list of
hosts returned by gethostbyaddr().  We do test for at least one FQDN
in gethostbyaddr().
1997-01-13 19:35:39 +00:00
Guido van Rossum 265b5b3f03 Use new struct which supports standardized sizes 1997-01-11 19:22:11 +00:00
Guido van Rossum 88b85d4f63 Add __len__ method 1997-01-11 19:21:33 +00:00
Guido van Rossum afe3ebfa5c Use newer struct, which handles unsigned long right 1997-01-11 19:21:09 +00:00
Fred Drake 4de02d9722 (ftplib.py): Added parse150() function and FTP.ntransfercmd(). This allows
access to the expected size of a transfer when available.
1997-01-10 18:26:09 +00:00
Fred Drake 41dc09d10e (Tkinter.py): Add support for Frame(w, class_="classname") as an alternative
to Frame(w, cnf={"class": "classname"}).  I think this is the only
	widget other than Toplevel that needs to be concerned about setting
	the widget's class (-class must be the first option on the Tcl
	widget creation command).
1997-01-10 15:13:12 +00:00
Barry Warsaw 5bc697dd31 Test of the sunaudiodev module -- it simply plays a sound if it can
find one and doesn't output any data that can be verified.  If it
can't find a sound file by looking in the standard Solaris locations
(which we can extend later), it raises an ImportError.
1997-01-07 21:05:29 +00:00
Barry Warsaw dce1005908 Added an os._exit(0) in the parent so we don't have two test processes
after test_socket.py is run!
1997-01-07 21:02:06 +00:00
Barry Warsaw 95f92dfad4 New output file for strop test 1997-01-06 22:46:45 +00:00
Barry Warsaw da0e520bc0 Added a couple of strop.join() tests for large lists and long items
within the lists (new output file to be checked in shortly).
1997-01-06 22:46:07 +00:00
Guido van Rossum 7fc0bf8247 Fix the following bug:
- When dragging the mouse in either listbox, the *first* entry
clicked on is selected rather than the last (but the last one is
highlighted).

This is done by changing the bindtags so that our binding is executed
after the default binding (which sets the 'active' index to the last
item selected), and using 'active' instead of 'anchor' as the index to
ask for.
1997-01-03 23:39:26 +00:00
Roger E. Masse 32e949d1f2 This is a very inobstrusive test for the existance of the SGI cd module
and all it's attributes.  More comprehensive examples can be found in
Demo/cd and require that you have a CD and a CD ROM drive
1997-01-03 23:00:13 +00:00
Roger E. Masse 5150542b8f Output file for test_cd.py 1997-01-03 22:58:43 +00:00
Guido van Rossum 9d1a02ce33 Some small changes.
Raise ImportError instead of SystemExit when $DISPLAY is not set, so
regrtest.py will do the right thing.

Add a call to gl.clear() to clear the window before drawing in it.

Add some verbose prints for completeness.

Use gl.v2i() for the coordinates of one of the lines, for a little bit
of variety.

Reduce the time the window is displayed from 5 to 2 seconds.
1997-01-03 22:42:08 +00:00
Roger E. Masse 4a9ac0612d Output file for test_al.py 1997-01-03 22:39:31 +00:00
Roger E. Masse 1f983df3bd This is a very inobstrusive test for the existance of the al module and all
it's attributes.  More comprehensive examples can be found in Demo/al
1997-01-03 22:39:03 +00:00
Barry Warsaw 61bc874b19 Output of socket module test. 1997-01-03 20:04:09 +00:00
Barry Warsaw cf3d4b5123 Test of the socket module. The following functions and methods are
not currently tested (or even touched):

#	socket.fromfd()
# 	sktobj.getsockopt()
#	sktobj.recvfrom()
#	sktobj.sendto()
#	sktobj.setblocking()
# 	sktobj.setsockopt()
#	sktobj.shutdown()
1997-01-03 20:03:32 +00:00
Roger E. Masse 7a61f871a7 Updated to include the verbose flag from test_support 1997-01-03 19:20:17 +00:00
Guido van Rossum 04ebf5ca5d Change the ``calcsize*3'' test to be portable to 64-bit machines. 1997-01-03 19:00:37 +00:00
Barry Warsaw 461a1c172f Output for signal module test 1997-01-03 16:01:20 +00:00
Guido van Rossum 420c11c6aa Added f/d tests for specific byte orders. 1997-01-03 00:09:46 +00:00
Guido van Rossum 6083f0e9ce Use the new struct module's ability to pack and unpack standardized
data formats.  The _xdr module is no longer used, since struct
supports the required IEEE floats and doubles.

(I have one doubt about not using _xdr.  The struct module doesn't
handle Inf, NaN and gradual underflow correctly.  If the _xdr module
does these things better, it may still have a (small) competitive
advantage.  On the other hand, since not all platforms support IEEE
floating point, it's not clear that it would be a good idea to ever
transfer Inf or NaNs.  Gradual underflow can be fixed in the struct
module.
1997-01-02 22:52:15 +00:00
Barry Warsaw 5afafad82d <rotorobj>.setkey() now requires exactly one argument 1997-01-02 20:02:44 +00:00
Guido van Rossum b02092a9b2 Added characteristics of shttp, https, and snews. 1997-01-02 18:18:27 +00:00
Guido van Rossum 6757748641 Properly parenthesize a long Boolean combination. Formerly, you could
pass invalid seed values.
1997-01-02 18:13:35 +00:00
Fred Drake 2823168c46 (formatter.py): Add a flush() method to the writer interface. This really
needs to be a standard part of the interface, so we'll have it in
	for the next release.
1996-12-31 20:50:51 +00:00
Guido van Rossum 2a37850273 Exercise the new feature set somewhat.
Use TestFailed exception and verbose flag from test_support module.
1996-12-31 17:25:47 +00:00
Guido van Rossum 36bb181cdf Rewrote _{read,write}_{short,long} to use the newly revamped struct
module.  (Small problem: struct.pack() won't deal with the Python long
ints returned by struct.unpack() for the 'L' format.  Worked around
that for now.)
1996-12-31 05:57:34 +00:00
Guido van Rossum c17a268398 Added support for RFC 850 style dates, as used by some HTTP servers
(such as Netscape-Commerce and CERN).

An example of a RFC 850 date: 'Wednesday, 18-Dec-96 21:00:00 GMT'

From: Chris Lawrence <quango@themall.net>
1996-12-27 15:42:35 +00:00
Guido van Rossum 178ff353e8 Fix bogus implementation of Group.bind().
Added unbind() to CanvasItem and Group classes.
1996-12-27 15:40:31 +00:00
Guido van Rossum 8371013f9a Added config(ure) method to Image class.
(Fred Drake)
1996-12-27 15:33:17 +00:00
Guido van Rossum 0b96b945b8 Change the default values for IntVar and DoubleVar to numbers (they
were strings, accidentally).
1996-12-27 15:30:20 +00:00
Guido van Rossum 671dc20efc Crude but effective hack to clear the parser cache every so often.
(Fred Drake.)
1996-12-27 15:26:15 +00:00
Roger E. Masse cf284cc5db Test output for the gl C extension module. 1996-12-24 19:36:33 +00:00
Roger E. Masse 6da2953f1e gl is a *huge* module. This is a very simple test that insures that
all the modules attributes are present and creates a small criss-cross
window for 5 seconds (example from the documentation :-)  A more
comprehensive test would probably be useful... but maybe overkill.
1996-12-24 19:36:07 +00:00
Barry Warsaw fb817cd4a2 Output files
test_rotor.py: New test of the rotor module.

test_*: converted to the new test harness.  GvR note!  test_signal.py
works interatively (i.e. when verbose=1) but does not work inside the
test harness.  It must be a timing issue, but I haven't figured it out
yet.
1996-12-23 23:40:11 +00:00
Barry Warsaw 5e056bbb76 test_rotor.py: New test of the rotor module.
test_*: converted to the new test harness.  GvR note!  test_signal.py
works interatively (i.e. when verbose=1) but does not work inside the
test harness.  It must be a timing issue, but I haven't figured it out
yet.
1996-12-23 23:39:42 +00:00
Roger E. Masse f85f052035 Very very small comment change. 1996-12-20 22:39:24 +00:00
Roger E. Masse fab8ab8067 Many scripts, but small changes. Update the way the scripts obtain the
'verbose' flag ala GvR updated test harness architecture.

Old way:

	verbose = 0
	if __name__ == '__main__':
		verbose = 1

New way:

	from test_support import verbose

Some other small readablility and functionality updates.
1996-12-20 22:36:52 +00:00
Barry Warsaw 4b722788ae added test of the regex module
[NOTE: testall.py and autotest.py might could go away soon, I've
 played with Guido's new regrtest.py script and it seems to work well.
 I'll wait until Guido gives the word to completely switch over -- and
 change the Makefile too!]
1996-12-20 22:00:21 +00:00
Roger E. Masse 4455cd8e19 More and better comments. 1996-12-20 21:52:29 +00:00
Roger E. Masse 3507f502c9 Minor semantic cleanup. 1996-12-20 21:47:58 +00:00
Roger E. Masse e9e0bd90ae Output for test script for the SGI imgfile module. 1996-12-20 21:42:09 +00:00
Roger E. Masse 033d91b784 Test script for the SGI imgfile module. 1996-12-20 21:41:50 +00:00
Roger E. Masse 470dcbf8e3 8 bit greyscale test file needed for testing imageop and imgfile. 1996-12-20 20:50:10 +00:00
Roger E. Masse 47e98307e0 Test program for the SGI imageop module. 1996-12-20 20:49:06 +00:00
Roger E. Masse cfaac40e31 test output for SGI imageop C module. 1996-12-20 20:47:17 +00:00
Guido van Rossum 0b25a662e0 Two new files (to shut up regrtest). 1996-12-20 03:14:42 +00:00
Guido van Rossum 4f30aff585 Added example DL for SGI IRIX. 1996-12-20 03:13:36 +00:00
Guido van Rossum 4fdb744f53 Added test for minmax. 1996-12-20 03:13:06 +00:00
Guido van Rossum 152494aea2 New regression test harness. See usage message / doc string. 1996-12-20 03:12:20 +00:00
Guido van Rossum 2bde783a97 Import verbose flag from test_support instead of testing __name__. 1996-12-20 03:03:39 +00:00
Guido van Rossum 0a94cc788e Set test_support.verbose to 0, to signal tests only to generate
portable output.
1996-12-20 03:03:01 +00:00
Guido van Rossum 531661c1ae Add verbose flag for regression test to clear. 1996-12-20 02:58:22 +00:00
Barry Warsaw a09ec19a33 Test of the operator module 1996-12-18 19:56:22 +00:00
Roger E. Masse 96bd636ad1 Test script output for the UNIX group file access module (grp) 1996-12-18 19:37:07 +00:00
Roger E. Masse 749cc6b241 Test script for the UNIX group file access module (grp) 1996-12-18 19:36:34 +00:00
Guido van Rossum 5eaf457869 Different operation in verbose mode: show the supported nonstandard
options.  Also added two: %n and %t (newline and tab character).
1996-12-18 18:03:10 +00:00
Barry Warsaw af82a7ef49 In lieu of harness rewrite, fixed problem with test_thread ImportError
triggering a bogus TestFailed exception.
1996-12-18 16:39:31 +00:00
Roger E. Masse d87e0bf651 Test output for the GNU dbm module (gdbm) 1996-12-17 19:54:46 +00:00
Roger E. Masse 62a017c092 Test script for the GNU dbm module (gdbm) 1996-12-17 19:54:27 +00:00
Roger E. Masse 0bff94ffdf Added the test output for fcntl. 1996-12-17 17:41:36 +00:00
Roger E. Masse fb01d4b1a4 Added a test script for the fcntl C module. 1996-12-17 17:41:09 +00:00
Barry Warsaw 8069f43815 Output for _xdr module test 1996-12-17 00:02:45 +00:00
Barry Warsaw 3863fb53b8 A test of the _xdrmodule (not the entire xdr.py module). 1996-12-17 00:00:53 +00:00
Barry Warsaw 237efc5d6f Added _xdrmodule test 1996-12-17 00:00:17 +00:00
Barry Warsaw ac3acc2b48 (test_thread): output from thread test 1996-12-16 23:42:56 +00:00
Barry Warsaw af0a1a6530 (test_thread.py): modifications to quiet it up when not running as a script.
(testall.py): added test_thread to the list of regression tests.
1996-12-16 23:42:35 +00:00
Fred Drake 09bcf8c031 (sgmllib.py): Partial acceptance of patch from David Leonard
<leonard@dstc.edu.au>; allows hyphen and period in the middle
	of attribute names.  Still not allowed as first character;
	as first character these are illegal in the Reference Concrete
	Syntax, and we've not identified any use of these characters as
	the first char in an attribute name in deployment on the web.
1996-12-16 21:56:27 +00:00
Roger E. Masse b6454e58bc Updated test_crypt test to jive with bwarsaw testing style 1996-12-16 20:44:56 +00:00
Roger E. Masse a38ab505b6 Revised output for test_crypt 1996-12-16 20:44:16 +00:00
Roger E. Masse 9c6db35a1e Revised test for errno ala bwarsaw's testing paradigm. 1996-12-16 20:40:20 +00:00
Roger E. Masse 8a51de4cdd Output files for test_dl and test_errno 1996-12-16 20:36:05 +00:00
Roger E. Masse e00d4da7fa Added test_dl to harness 1996-12-16 20:34:43 +00:00
Roger E. Masse 2362b58952 Revised strategy for testing recomended by bwarsaw 1996-12-16 20:25:44 +00:00
Roger E. Masse 8ba76d3cf3 Added test_errno to the test suite 1996-12-16 20:20:33 +00:00
Roger E. Masse 7eee08d04f Test for the dl module. This only works for SunOS and Solaris.
I've attempted to make a test that silently exits if either
module dl is not present, we're not on a Sun OS, or a standard
shared library ('/usr/lib/libresolv.so') is not found...  Otherwise,
It does a simple test of dlmodule on that library.  I *think*
this would be ok to add to testall.py but I'll wait till I hear
some feedback on the liberalness of this approach.
1996-12-13 20:32:26 +00:00
Barry Warsaw 2cc8163e30 nonstandard_expectations is only added when in verbose mode, so we
don't need the if test for verbosity when checking for results of an
unsupported option.
1996-12-13 18:12:34 +00:00
Barry Warsaw 4c23b5fdbc Hmm, now that I think about it, we *can* use time.time() and 'date' if
running verbose.
1996-12-13 18:08:58 +00:00
Barry Warsaw 4eb01cd372 More or less portabilized.
1. If a conversion isn't supported on the current platform, just
   ignore it, unless running as a script (i.e. verbose)

2. Don't use time.time() and os.popen('date') to get the raw values.
   These will always be different!
1996-12-13 18:07:07 +00:00
Barry Warsaw 3c700ed613 Fixed 1996-12-13 18:05:28 +00:00
Guido van Rossum 0564e12367 Added quote_plus() and unquote_plus(), to do space/plus substitutions
for form field values.
1996-12-13 14:47:36 +00:00
Barry Warsaw e3c0170ba0 Output file for module struct test 1996-12-13 00:25:52 +00:00
Guido van Rossum 27eb14d894 Added support for 4-channel on SGI.
Allow specifying the test file on the command line.
1996-12-13 00:19:56 +00:00
Guido van Rossum 25bcdb0e56 Added QUADRO. 1996-12-13 00:19:15 +00:00
Guido van Rossum 0caa7ec206 Fixed conversion between seconds and milliseconds. 1996-12-12 23:42:20 +00:00
Barry Warsaw 07a0eeceaa A test of the struct module 1996-12-12 23:34:06 +00:00
Barry Warsaw cb17a465eb Print final report, either all tests OK, or list of failed and missing
tests.
1996-12-12 22:34:26 +00:00
Barry Warsaw 1c92eba2dd Print a more meaningful message when a test's output file wasn't
found.
1996-12-12 22:21:10 +00:00
Guido van Rossum 32616fbee6 Make sure ok_builtin_modules, ok_dynamic_modules and
builtin_module_names are always tuples.
1996-12-12 21:31:52 +00:00
Guido van Rossum 15d1079dd2 Fixed test_strftime to be silent when called from autotest. 1996-12-12 19:07:19 +00:00
Guido van Rossum 483705c5a9 Added test_strftime (Skip Montanaro). 1996-12-12 19:03:11 +00:00
Guido van Rossum 6cdd7a0433 Add mktime_tz() which turns a date_tz 10-tuple into a standard Unix timestamp. 1996-12-12 18:39:54 +00:00
Guido van Rossum c0967cd4a2 Added a bunch of new winfo options; we should now be up to date with
Tk 4.2.  The new winfo options supported are: mananger, pointerx,
pointerxy, pointery, server, viewable, visualid, visualsavailable.

Also fixed bugs in winfo_colormapfull() and winfo_containing().
1996-12-12 16:43:05 +00:00
Barry Warsaw 792c94a320 A test of the select module that is actually reproduceable! 1996-12-11 23:58:46 +00:00
Barry Warsaw 042a207061 Output of rgbimg module test 1996-12-11 21:42:38 +00:00
Barry Warsaw 8bc74ceb8b Added test of rgbimg module 1996-12-11 21:41:42 +00:00
Barry Warsaw 66e7f3ac43 minor formatting nit 1996-12-11 21:40:04 +00:00
Guido van Rossum dbfed710a1 Be more careful with the shuffling of stdout. 1996-12-11 16:54:54 +00:00
Barry Warsaw d96dfb72ea Output of the nis and pwd module tests 1996-12-11 16:54:15 +00:00
Barry Warsaw 3d070fb391 Test of the pwd module 1996-12-11 16:53:51 +00:00
Barry Warsaw ebfa2c4417 Added test_pwd 1996-12-11 16:52:56 +00:00
Guido van Rossum 2b6c2faa64 Rewrite without using try-except to break out of two loops. 1996-12-11 16:28:30 +00:00
Barry Warsaw 870d5c67ae Just test one key/value pair for one NIS map. I.e. don't test them
all because it can take a really long time.
1996-12-11 16:07:30 +00:00
Barry Warsaw 3236b334ef test of the nis module 1996-12-11 01:01:38 +00:00
Barry Warsaw 7822681992 added test_nis 1996-12-11 01:01:09 +00:00
Barry Warsaw dde5c70c8a Test output files in their new location 1996-12-10 23:20:09 +00:00
Barry Warsaw e4a252ef88 Directory for test output files: Output => output 1996-12-10 23:19:14 +00:00
Barry Warsaw 2e644a0f86 When run as a script, runs each test and sends results to stdout
(i.e. this restores the old functionality).

Note that if a test couldn't be imported, it is just ignored (and no
warning is printed).
1996-12-10 23:10:39 +00:00
Barry Warsaw 272c00b634 New regression testing harness.
(testall.out): obsolete.  see individual test output files in the
Output directory.

(testall.py): now contains only the list of all tests

(autotest.py): The new testing harness.  Supports -g option to
generate output files instead of verifying; -w option to warn about
non-tested optional modules; additional command line arguments to
generate or test individual tests (useful for generating output file
of new tests).
1996-12-10 19:51:10 +00:00
Barry Warsaw 924e5d55b7 A test of the `new' module. The new.code() test is fairly bogus since
I'm really not sure what the proper inputs are.  I do flex the
function call though by passing in arguments of the proper type.  I
don't try to exec the code object that gets returned!
1996-12-10 16:28:53 +00:00
Barry Warsaw 0f150e41be Added test_new. 1996-12-10 16:27:16 +00:00
Guido van Rossum 5de1f8dac8 The usual; added several test modules, too. 1996-12-10 16:02:14 +00:00
Guido van Rossum bd01374da8 Add optional data argument to urlopen() and open_http(), to trigger POST. 1996-12-10 16:00:28 +00:00
Guido van Rossum 8b82baa398 In the HTTP reply header, be more accepting in the HTTP version. 1996-12-10 15:58:22 +00:00
Roger E. Masse 16f9fd2bcf Added a test script for dbmmodule.c and added it to testall.py and
updated testall.out
1996-12-10 00:06:24 +00:00
Barry Warsaw 3ac30af867 Added test_new 1996-12-10 00:02:57 +00:00
Roger E. Masse 75362381b5 new test script for cryptmodule.py 1996-12-09 23:13:45 +00:00
Roger E. Masse b6b85ddc95 Test script/output for cryptmodule.c added to testall.py and testall.out 1996-12-09 23:13:07 +00:00
Roger E. Masse 3daddda165 New test module for complex math module 1996-12-09 22:59:15 +00:00
Roger E. Masse b71035782e Added test_cmath.py to test complex math module 1996-12-09 22:58:42 +00:00
Barry Warsaw 3ab26b9d75 (testall.py): Slightly improved test harness to make it easier to add
simple tests.

(testall.py, testall.out): Added MD5 testsuite
1996-12-09 22:34:15 +00:00
Barry Warsaw 49852831fc Added test_strop 1996-12-09 21:49:55 +00:00
Barry Warsaw ad522facf7 Added tests of all strop module functions, and touching of module
variables
1996-12-09 21:49:10 +00:00
Guido van Rossum 6c832ebfe9 Added test_array output line. 1996-12-09 21:37:33 +00:00
Roger E. Masse 8db1b0764b module to test the arraymodule created and added to testall.py 1996-12-09 20:09:16 +00:00
Barry Warsaw 6ab7f077ff Added test_time 1996-12-06 23:30:49 +00:00
Barry Warsaw 5bebca2ac2 Added 'test_time' 1996-12-06 23:30:33 +00:00
Barry Warsaw b0c2232011 test of time module. not terribly fancy, but it does touch every
function and variable in the module, verifies a few return values and
even tests a couple of known error conditions.
1996-12-06 23:30:07 +00:00
Barry Warsaw 75eccc5bcf Unpacker.get_buffer(): new method to access the internal buffer of data 1996-12-04 22:04:39 +00:00
Guido van Rossum f06ee5fa07 /usr/local/bin/python -> /usr/bin/env python 1996-11-27 19:52:01 +00:00
Guido van Rossum 29e77816f5 Added safeguard against failure in __del__. 1996-11-27 19:39:58 +00:00
Guido van Rossum 40a172c779 Added ALL='all'. 1996-11-20 22:20:21 +00:00
Guido van Rossum 58103d3b11 Turn leading minus sign into underscore for image widget name -- the
hyphen confused Tk into thinking the name was an option.
1996-11-20 22:17:38 +00:00
Guido van Rossum 27cb8a4884 Added support for timezone in date field. getdate_tz() and
parsedate_tz() return a 10-tuple, the last field is the tz offset in
seconds (e.g. -18000 or -5 hours for EST).
1996-11-20 22:12:26 +00:00
Guido van Rossum 3c8484e866 When re-raising an exception raised by a module used internally as
IOError, keep the traceback.
1996-11-20 22:02:24 +00:00
Guido van Rossum 3508d60f99 When removing a messge from all sequences, don't remove from 'cur',
which needs to stay unless explicitly set.
1996-11-12 04:15:47 +00:00
Guido van Rossum e08c04c387 Added 'strict_parsing' option to all parsing functions. This causes a
ValueError exception when the query string contains fields that don't
contain exactly one '=' sign.  (By default, such fields are simply
ignored.)  Added this to the doc string describing parse() and
parse_qs().

Also changed the default for keep_blank_values from None to 0 (the
preferred way to spell 'FALSE').
1996-11-11 19:29:11 +00:00
Guido van Rossum 73eba25f5f Don't require leading '-' on option name to Text.tag_cget 1996-11-11 19:10:58 +00:00
Guido van Rossum c5d7e80739 Fix the way the Authorization header is sent (how could this have worked?). 1996-11-11 19:01:17 +00:00
Guido van Rossum c45289cb81 The usual :-( 1996-10-24 22:27:16 +00:00
Guido van Rossum 40f7a55608 Get rid of bogus binding of <Delete> to a function that deletes the next
character (this is already a built-in binding now).
1996-10-24 18:34:36 +00:00
Guido van Rossum 16d5b113f6 Fix truncated paragraph in doc string.
Bump version to 2.0.
1996-10-24 14:44:32 +00:00
Guido van Rossum 9b67621b66 Cast mtime gotten from stat() to long int -- else it won't work
on the Mac.

Jack!  Please fix this in the Mac distributions!
1996-10-24 13:42:30 +00:00
Guido van Rossum d804bab721 Make self.rfile unbuffered (self.wfile already is). This should fix
CGIHTTPServer.py when used with the POST command.
1996-10-23 14:30:23 +00:00
Guido van Rossum 149574767c Added support for floating point resolution to Scale.get(). 1996-10-23 14:16:28 +00:00
Guido van Rossum 176f10e3d5 Get rid of evil workaround for Python 1.4b2 bug. 1996-10-22 18:59:47 +00:00
Guido van Rossum 5b1b33c7f4 Fix another case where... 1996-10-22 13:28:37 +00:00
Guido van Rossum 9cb018e693 Change the default seeding -- use 8 bits of sub-second precision and
fold in the higest 8 bits of the time as well.
1996-10-21 23:20:03 +00:00
Guido van Rossum b6685dcfeb The usual... 1996-10-21 18:10:19 +00:00
Fred Drake 0c373691ae (Tkinter.py): Fixed bug in re-implementation of OptionMenu. 1996-10-21 17:09:31 +00:00
Guido van Rossum 28574b557b (Fred Drake:) Re-wrote the OptionMenu class to allow access to a real
Menu object via om['menu'] -- this is necessary to use a post-command
with an OptionMenu.  The API has not changed.
1996-10-21 15:16:51 +00:00
Guido van Rossum 008ec689be Added warning not to import directly. 1996-10-15 14:40:41 +00:00
Guido van Rossum 4808dcb564 Allow code objects to be passed to run() and eval(). 1996-10-15 14:40:21 +00:00
Guido van Rossum e449af7da9 Ellipses -> Ellipsis rename (the dictionary really says that it should
be Ellipsis!).
Bumped the API version because a linker-visible symbol is affected.
Old C code will still compile -- there's a b/w compat macro.
Similarly, old Python code will still run, builtin exports both
Ellipses and Ellipsis.
1996-10-11 16:25:41 +00:00
Guido van Rossum 8741b2b988 Added Slice and Ellipses types. 1996-10-11 16:00:06 +00:00
Guido van Rossum b030bc026e Fix some cases where self.openedurl wasn't set. 1996-10-10 16:01:16 +00:00
Guido van Rossum b5fa1cb855 Don't add names that start with _ 1996-10-10 16:00:28 +00:00
Fred Drake ca8cdc6066 (formatter.py): Simplify NullFormatter definition of add_hor_rule() to match
documentation.
1996-10-08 21:57:47 +00:00
Guido van Rossum 5b1d9bad32 Remove RCS crud... Sigh... 1996-10-08 14:15:25 +00:00
Guido van Rossum a4a75278d9 Removed RCS crud from official Python release version. 1996-10-08 14:14:49 +00:00
Guido van Rossum b8cc6ae5a1 The usual... Sigh... 1996-10-08 14:13:43 +00:00
Guido van Rossum 6592f88fc0 Removed debugging print statement 1996-10-08 14:10:51 +00:00
Guido van Rossum edaf1c931c Simple test module for strop. 1996-10-08 14:07:56 +00:00
Guido van Rossum 3159e1e1ef Change to always call list.append with a single argument.
This does not mean I still support this code!!!
1996-10-08 14:07:21 +00:00
Guido van Rossum 2715bb20db Changes to always call list.append with a single argument. 1996-10-08 14:06:35 +00:00
Guido van Rossum b7f48e39c3 Change to always call list.append with a single argument. 1996-10-08 14:06:17 +00:00
Guido van Rossum a97b8eef70 Set the __file__ attribute of the imported module in both versions of
load_module(), to mimick the behavior of imp more closely.
1996-10-07 23:41:54 +00:00
Guido van Rossum ccd8b19c99 Add provisions to set the (to be documented!) instance variable
'writer' of the NullFormatter to the writter passed in, or to a
NullWriter if none (or None) is passed in.
1996-10-07 21:29:49 +00:00
Guido van Rossum 36fc11e894 Compromise on test in find_class(): a user-defined function is okay,
but a built-in function is not.
1996-10-07 14:34:20 +00:00
Fred Drake cab3c3b8d4 (Tkinter.py): Improve application basename determination to make .py and
.pyc extensions completely equivelent when locating the "profile"
	which should be read on startup.
1996-10-06 17:55:20 +00:00
Guido van Rossum 4be63d1725 Added getparamnames() to Message class -- return a list of all
parameters of the content-type header.
1996-10-04 20:14:02 +00:00
Guido van Rossum 8299e46831 Don't auto-install on import. This slows down apps that use
some of our modules for special purposes (e.g. rexec).
1996-10-04 19:57:11 +00:00
Fred Drake 3faf9b4d48 (Tkinter.py): Fixed dumb typo in Misc.tk_setPalette(). 1996-10-04 19:23:04 +00:00
Guido van Rossum fe779a1dc8 Don't mix stdout/stderr. 1996-10-02 14:57:28 +00:00
Guido van Rossum cc778ebd62 Add main program similar to pdb. 1996-10-01 02:55:54 +00:00
Guido van Rossum 24611f80e8 Always open file objects in binary mode. 1996-09-30 22:02:50 +00:00
Guido van Rossum dfd9cb1e12 Don't die if an ok file method (e.g. fileno) doesn't exist. 1996-09-30 18:50:44 +00:00
Fred Drake 3c602d7d0c (Tkinter.py): Many revisions for Tk 4.X: Added clipboard support, updated
selection interface, handle the -displayof option intelligently in
	many places.  Added "wm colormapwindows" and "winfo colormapfull"
	support.  Removed "focus default" and "focus none" method: these are
	not in Tk 4.X.
1996-09-27 14:06:54 +00:00
Fred Drake e9c515adc7 (Canvas.py): Added definition of CanvasItem.cget() as suggested by
Nils Fischbeck.
1996-09-26 20:21:26 +00:00
Guido van Rossum e7b9fde1b8 1. Correct typo in FileWrapper.close() (fix by AMK).
2. New trusted built-in modules cmath, errno, operator, parser.
3. Corrected bogus s_apply() -- the new one actually works (reported by AMK).
1996-09-25 18:47:39 +00:00
Guido van Rossum 6244867e56 Revamped test case and updated doc string. 1996-09-17 21:33:15 +00:00
Guido van Rossum 934a4cea85 Show names of locals in disco (Ka-Ping Yee) 1996-09-12 17:39:36 +00:00
Guido van Rossum 1550ff722d Layout and cleanup by Fred 1996-09-11 19:43:52 +00:00
Guido van Rossum 28d4ba24c9 Another batch... 1996-09-11 19:07:45 +00:00
Guido van Rossum 6e8ec59eb4 Implement lower by calling lower, not lift. 1996-09-11 14:25:41 +00:00
Guido van Rossum 6b7a7e9fe0 Bug fixes in index&icursor suggested by Nils Fischbeck. 1996-09-11 14:23:43 +00:00
Guido van Rossum 151fcfd101 Zapped obsolete opcode LOAD_GLOBALS. 1996-09-10 18:26:36 +00:00
Guido van Rossum ba885ffaa0 Added linux2 specific code :-( 1996-09-10 17:40:16 +00:00
Guido van Rossum 5f8ea10bc2 Fix bogus len() call 1996-09-10 17:39:56 +00:00
Guido van Rossum ec577d53a9 Correct sys.path[0] when used stand-alone 1996-09-10 17:39:34 +00:00
Guido van Rossum 974e46cc5e Fix type in loop stripping '__.' from name 1996-09-10 17:38:20 +00:00
Guido van Rossum 2ea05098eb close module file after loading 1996-09-10 17:37:44 +00:00
Guido van Rossum e6ad8913e2 One fix by sjoerd and one suggested by him. Bumped __version__ to 1.5.
Fix 1: add a method geturl() to the file-like object returned by urlopen().
Fix 2: treat http error 301 the same as error 302.
1996-09-10 17:02:56 +00:00
Guido van Rossum 688bbfc217 simpler version of the previous fix 1996-09-10 12:39:26 +00:00
Guido van Rossum 8535b29f39 compatibility changes suggested by Jack,
for tk_menuBar and tk_bindForTraversal
(i.e. don't call these for Tk >= 4.1)
1996-09-10 12:36:34 +00:00
Guido van Rossum 2c349bbc77 Rewritten by Lars Wizenius to add long options 1996-09-09 15:48:24 +00:00
Guido van Rossum 5c1d1ee8a8 Change to allow keyword args for Group,
suggested by Nils Fischbeck, adapted by Fred
1996-09-06 21:09:31 +00:00
Guido van Rossum 42b78e6441 Fixed Entry.select_from() to acually call the "select from" widget
command instead of the non-existant "select set".  (Fred)
1996-09-06 14:20:23 +00:00
Guido van Rossum c204c70c1a Added logging support. 1996-09-05 19:07:11 +00:00
Guido van Rossum e5e46e0d29 Fixed embarrassing logic bug in read_lines_to_outerboundary(). 1996-09-05 19:03:36 +00:00
Guido van Rossum 2caac73aa6 Added Menu.insert*() methods [Fred] 1996-09-05 16:46:31 +00:00
Guido van Rossum e1a7a3b3b3 Add initial values to variables to avoid crash in __del__ 1996-09-05 16:45:49 +00:00
Guido van Rossum f469d5b05d Get rid of nobody_uid() and import pwd -- not used here. 1996-09-04 23:42:04 +00:00
Guido van Rossum 5ab007b098 Subtle hack so the eps printed is not dependent on the formatting
habits of the C library we happen to use...
1996-08-29 19:00:46 +00:00
Guido van Rossum a9b60d9411 No double underscores for globals please 1996-08-26 22:34:57 +00:00
Guido van Rossum a8763e54ff Another batch of updates... 1996-08-26 18:33:32 +00:00
Guido van Rossum 78c9637075 Bump exposed __version__ to 1.4.
Correctly handle a URL containing user:password@host when using a proxy.
1996-08-26 18:09:59 +00:00
Guido van Rossum 0c8cf888eb Don't die when getuid() or getpid() aren't defined. 1996-08-26 16:40:20 +00:00
Guido van Rossum 3df7b5a546 Don't do truncation to 8+3 format -- this is used on NT file systems! 1996-08-26 16:35:26 +00:00
Guido van Rossum c75db0b7f4 Added Mime writer module (formerly in Grail) 1996-08-26 16:33:30 +00:00
Guido van Rossum cfd89355ef typo (cotinue -> continue) 1996-08-26 16:20:31 +00:00
Guido van Rossum 8e44991b34 Three sets of changes from Grail:
date: 1996/08/14 17:27:21;  author: fdrake;  state: Exp;  lines: +11 -9
(formatter.py):  Establish a consistent space-handling policy, so that all
        spaces are handled by the outermost context in which they might be
        considered.  (I.e., softspaces at element boundaries migrate
        outwards.)

        For instance: "<A> <IMG> </A>" becomes " <A><IMG></A> ".

        This avoids some of those nasty underlined spaces around images.  It
        does not affect spaces *between* images within an anchor.

date: 1996/08/01 17:02:09;  author: fdrake;  state: Exp;  lines: +3 -2
(formatter.py):  Added required parameter to the NullFormatter class; this
        was omitted by accident.

        Made AbstractFormatter.add_literal_data() handle preceeding softspace
        correctly instead of expecting the caller to do it.

date: 1996/07/23 22:18:56;  author: fdrake;  state: Exp;  lines: +1 -1
(formatter.py):  Correct assert_line_data() to update all internal conditions;
        This now handles headers with only image content immediately followed
        by anything.
1996-08-26 16:19:23 +00:00
Guido van Rossum f8abb38737 Slightly faster (un)quoting. 1996-08-26 15:56:12 +00:00
Guido van Rossum f480c674b1 Use correct separator for capwords(s, sep). 1996-08-26 15:55:00 +00:00
Guido van Rossum 9e3f42909a Emacs font-lock de-bogo-kludgificocity 1996-08-26 15:46:13 +00:00
Guido van Rossum 5c8c91bbc5 Changes for Canvas by Fred 1996-08-22 23:18:09 +00:00
Guido van Rossum f813f56bcd imghdr.what(): check for not h'. This lets
you do:
    imghdr.what(None, '')
And still go down the
1996-08-22 21:20:46 +00:00
Guido van Rossum c417ef8e57 Added a small test program. 1996-08-21 23:38:59 +00:00
Guido van Rossum 4747887880 New batch from Fred 1996-08-21 14:32:37 +00:00
Guido van Rossum d7abed3b14 Get rid of access statement 1996-08-20 20:40:07 +00:00
Guido van Rossum 3e065ada2c Attempt at Windows-NT compatibility. 1996-08-20 20:38:59 +00:00
Guido van Rossum 34f173110f Add optional separator character to capwords(), for completeness. 1996-08-20 20:25:41 +00:00
Guido van Rossum 63f0cf0840 delattr() can raise AttributeError, not KeyError.
Use keyword arg to set verbose flag in test func.
1996-08-20 20:25:08 +00:00
Guido van Rossum 422869a75c Correct description of splitext(). 1996-08-20 20:24:17 +00:00
Guido van Rossum 0f6a3bf490 Added locking hacks for AIX 1996-08-20 20:23:34 +00:00
Guido van Rossum f85de8a440 Added print_exception() convenience function. 1996-08-20 20:22:39 +00:00
Guido van Rossum 6ba66d0116 Improved tests; run twice, onece in normal mode, once in restricted mode. 1996-08-20 20:21:52 +00:00
Guido van Rossum 5c9bfe2b80 Get rid of debug print statements 1996-08-20 20:00:51 +00:00
Guido van Rossum 72fba794d6 Rename __test() to _test(). 1996-08-19 22:49:35 +00:00
Guido van Rossum 731630b5bf XDR interface, evolved from Demo/rpc/xdr.py by Barry. 1996-08-19 22:26:43 +00:00