How to interact with CDs?

I know python well as a language, but I know only a small part of the massive standard library, and I just realized that I absolutely did not know how I would read or write to a CD in Python, not to mention any other language. I believe that file read / write methods should come into play, but I feel it should be somehow different.

How do I read or write to a CD in Python? Are there any special methods that are usually followed for this, as opposed to reading / writing to the hard drive?

Is it as simple as switching to a CD drive and handling it just like a regular disk?

I believe that CDs are really getting old, and this knowledge will soon disappear due to usefulness, but I'm still interested.

+3
source share
1 answer

Try using the pygame library. It works with windows for python 3.x or 2.x ( download ), and it has a cdrom module that processes CDs. From what I saw, it is built mainly for using and playing audio tracks, but it can be useful for other things. Take a look at the documentation to see if it suits you.

0
source

All Articles