PyObjC-framework-DiscRecording provides Python wrappers for Apple's DiscRecording framework on macOS, enabling interaction with CD/DVD burning hardware and related functionalities. It is part of the larger PyObjC project, which provides access to macOS frameworks from Python. The library is actively maintained with frequent updates to align with new macOS SDK versions and Python releases, currently at version 12.1.
pip install pyobjc-framework-discrecordingVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to import the DiscRecording framework and list all detected disc burning devices on the system, printing their basic information. This uses the `DRDevice` class to query device properties.
Upgrade your Python interpreter to a supported version (e.g., Python 3.10+ for PyObjC 12.1) before upgrading PyObjC.
Review code that interacts with `init` family methods, especially if it relies on manual `retain`/`release` or assumes specific reference counts before and after `init` calls. Trust PyObjC's ARC modeling unless you have specific reasons otherwise.
If you override `__new__` in a Python subclass, ensure `__init__` is correctly implemented. If you rely on PyObjC's default `__new__`, be aware that `__init__` will not be called, and perform initialization directly in `__new__` or another appropriate method.
If using Python 3.13, ensure it is not compiled with free-threading support enabled, or use a Python version for which free-threading is not a factor when working with PyObjC.
For non-filesystem-bound URLs, use Cocoa methods to extract string representations (e.g., `url.absoluteString()`) rather than relying on `os.fspath()` for path-like object conversion.