Commit Graph

1473 Commits

Author SHA1 Message Date
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