[Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.81,1.82

Tim Peters tim_one@users.sourceforge.net
Sun, 10 Mar 2002 16:24:02 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv6297/python/Doc/lib

Modified Files:
	libstdtypes.tex 
Log Message:
file_truncate():  provide full "large file" support on Windows, by
dropping MS's inadequate _chsize() function.  This was inspired by
SF patch 498109 ("fileobject truncate support for win32"), which I
rejected.

libstdtypes.tex:  Someone who knows should update the availability
blurb.  For example, if it's available on Linux, it would be good to
say so.

test_largefile:  Uncommented the file.truncate() tests, and reworked to
do more.  The old comment about "permission errors" in the truncation
tests under Windows was almost certainly due to that the file wasn't open
for *write* access at this point, so of course MS wouldn't let you
truncate it.  I'd be appalled if a Unixish system did.

CAUTION:  Someone should run this test on Linux (etc) too.  The
truncation part was commented out before.  Note that test_largefile isn't
run by default.


Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -d -r1.81 -r1.82
*** libstdtypes.tex	26 Dec 2001 20:06:40 -0000	1.81
--- libstdtypes.tex	11 Mar 2002 00:24:00 -0000	1.82
***************
*** 1155,1161 ****
    Truncate the file's size.  If the optional \var{size} argument
    present, the file is truncated to (at most) that size.  The size
!   defaults to the current position.  Availability of this function
!   depends on the operating system version (for example, not all
!   \UNIX{} versions support this operation).
  \end{methoddesc}
  
--- 1155,1160 ----
    Truncate the file's size.  If the optional \var{size} argument
    present, the file is truncated to (at most) that size.  The size
!   defaults to the current position.
!   Availability:  Windows, many \UNIX variants.
  \end{methoddesc}