summaryrefslogtreecommitdiffstats
path: root/Lib/xdrlib.py
Commit message (Collapse)AuthorAgeFilesLines
* Derive exception classes from ExceptionNeal Norwitz2002-03-311-1/+1
|
* Use (c)StringIO for collecting bytes. Fixes bug #451622.Martin v. Löwis2001-08-161-8/+12
|
* final round of __all__ lists (I hope) - skipped urllib2 because Moshe may beSkip Montanaro2001-03-011-0/+2
| | | | giving it a slight facelift
* Whitespace normalization. Top level of Lib now fixed-point for reindent.py!Tim Peters2001-01-151-4/+4
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-2/+2
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-144/+144
|
* Packer.pack_uhyper(): Fixes needed to properly pack unsigned 64 bitBarry Warsaw1997-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Raise ConversionError instances the new fangled way, e.g.:Barry Warsaw1997-01-141-3/+4
| | | | | | raise ConversionError, msg where `msg' is passed as the argument to the constructor.
* Use the new struct module's ability to pack and unpack standardizedGuido van Rossum1997-01-021-77/+32
| | | | | | | | | | | | | 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.
* Unpacker.get_buffer(): new method to access the internal buffer of dataBarry Warsaw1996-12-041-0/+3
|
* Get rid of evil workaround for Python 1.4b2 bug.Guido van Rossum1996-10-221-4/+0
|
* No double underscores for globals pleaseGuido van Rossum1996-08-261-3/+3
|
* Rename __test() to _test().Guido van Rossum1996-08-191-2/+2
|
* XDR interface, evolved from Demo/rpc/xdr.py by Barry.Guido van Rossum1996-08-191-0/+324