PyObjC Framework Cinematic

12.1 · active · verified Tue Apr 14

PyObjC is a bridge between Python and Objective-C, enabling Python scripts to use macOS frameworks. This specific package, `pyobjc-framework-cinematic` (version 12.1), provides Python wrappers for Apple's Cinematic framework on macOS. PyObjC generally has a regular release cadence, aligning with macOS SDK updates and Python version support changes.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates importing the `Cinematic` framework module along with `Foundation` (for common macOS types) and the core `objc` bridge. It shows a generic pattern for instantiating a (placeholder) class within the `Cinematic` module. Actual functional code would require referring to Apple's Cinematic framework documentation for specific classes and methods, as PyObjC provides direct Pythonic access to these Objective-C APIs.

import Cinematic
import Foundation
import objc

# Note: This is a placeholder. Actual usage requires consulting Apple's
# Cinematic framework documentation for available classes and methods.

# Attempt to get a hypothetical Cinematic object (replace with actual class/method)
try:
    # Example: Trying to access a class like CIMovie, common pattern is 'FrameworkName.ClassName'
    movie_manager_class = Cinematic.NSObject.alloc().init() # Fallback to NSObject as a generic example
    print(f"Successfully accessed a Cinematic-related object: {movie_manager_class}")
    # Further interaction would depend on the specific Cinematic API
except Exception as e:
    print(f"Could not access Cinematic framework classes (this is expected if no specific Cinematic API is called): {e}")

# Example of using a basic Foundation type
ns_string = Foundation.NSString.stringWithString_("Hello from PyObjC Cinematic!")
print(f"Foundation NSString example: {ns_string}")

# Example of using a core objc bridge utility
print(f"PyObjC bridge version: {objc.__version__}")

view raw JSON →