bug in file.write() ?

Patrick Useldinger pu at vo.lu
Sun Aug 3 09:06:04 CEST 2003


Hi all,

> What Patrick's output seems to show is that after the failed copy, the
> CDRom is almost exactly half full. This is suspicious. It's also
> suspicious that the total is about 600Mb; shouldn't it be 640Mb or
> 700Mb??

It's a CD-RW 80 min, formatted with B's Clip with file system UDF1.50. 
After formatting, Windows Explorer shows a capacity of 572MB, with 50KB 
being used (for catalogue nd allocation tables, I suppose).

> What Patrick's output doesn't show is what is the size of the input
> file (from the I: drive). This would be very useful information. After
> the failure, there is a 299Mb file on the CDRom. Is that the whole
> file or not? 

The original file is 308.711KB in size; so the copied file is 94,94% of 
the original.

> Does the failure happen after 0% 50% or 100% of the time
> taken by a successful copy using the NT Explorer? 

I just did a test, it is after 92,5% of the time used by Explorer.

> After the failure,
> can you copy say 100Kb file to the CDRom i.e. is the 299Mb free space
> spurious?

I just copied OpenOffice 1.02, i.e. 50MB, without any problem:

  Directory of F:\

02/08/2003 22:41 <DIR>          .
02/08/2003 22:41 <DIR>          ..
03/08/2003 08:58 300.122.112 dfcArchive cheetah 20030731-234648 F.zip
12/04/2003 18:54  51.955.157 OOo_1.0.3_Win32Intel_install.zip
                2 File(s)    352.077.269 bytes
                2 Dir(s)     248.174.592 bytes free

> [Bengt] I wonder if 1) the error message is for real or is another
> error condition improperly reported
> John> Me too. It's not impossible for a write failure of various sorts
> to be reported as "file full.

Quite possible, as I repeated a similar test with a floppy disk, but 
that one worked OK (with a file larger than 50% of the disks capacity).
I have also repeated the procedure with different CD-RWs of different 
makes and capacities, but the percentage of 50 stays the same.

> Further observations: (1) IMHO you are taking a big gamble using stdio
> to copy to a CDrom. Is I: a network drive? I was under the impression
> that even with "professional" purpose-built CD-burning software, one
> should burn from a hard-drive, not be running other applications at
> the same time, ...

I: is my local 2nd harddisk, so I am really copying from a local 
harddisk to a CD-RW. Is there any other means I should have used in 
Python? Is used shutil.copy because it works cross-platform, and because 
it copies permission information.

> Is the type of CD that you are using the sort that allows you to write
> multiple times but only the last "session" is visible, and the
> previous sessions still take up space -- i.e. it's not erasable, you
> can't treat it in all respects just like a big fat 700Mb floppy disk?

Not with UDF1.5, as far as I know. I've been using CD-RWs for a few 
years now,and never experienced this situation.

Regards,
-Patrick
-- 
Real e-mail address is 'cHVAdm8ubHU=\n'.decode('base64')
Visit my Homepage at http://www.homepages.lu/pu/





More information about the Python-list mailing list