Any Python code for CD-R writing on a Windows box?

maney at pobox.com maney at pobox.com
Sun Dec 1 16:39:43 EST 2002


David Lees <abcdebl2nospammyyy at bellatlantic.net> wrote:
> It would be neat to write short python programs for selectively writing
> files onto my CD-RW drive for backups on my Win98 box.  Is there any
> Python code for writing a file or directory onto a CD-R disc?

If you have a RW disk in a RW drive and it's been formatted properly
(and you have the drivers installed), you can write to it as though it
were just a not-so-big, rather slow disk drive.  But that's probably
not what you meant to ask.  (you might want to consider it for this
sort of use, however, since the higher cost of rw media is offset by
being able to reuse them.)

For a CD-R disk, you don't just write a file.  You collect all the
files you want into an image of the CD-to-be and then burn them all at
once.  I am not familiar with any programmatic way to do this on
Windows, but perhaps there's a port of cdrecord or some such that you
could spawn.  However, I don't think this is going to scratch the itch
you seem to have.

There are ways to do incremental writes, but I've never seen that used
outside of... well, the Sony CD-Mavicas seem to do this, and that's all
that comes to mind offhand.  You can add on to a non-finalized CD-R,
but this is more like a special mode of invoking cdrecord (and building
the image), as well as consuming tens of MB of overhead every time, so
it's of limited use.

Luck!



More information about the Python-list mailing list