The sunaudio Module

The sunaudio module, shown in Example 9-6, identifies Sun AU audio files and extracts basic information about the file contents. The sunau module provides more complete support for Sun AU files.

Example 9-6. Using the sunaudio Module

File: sunaudio-example-1.py

import sunaudio

file = "samples/sample.au"

print sunaudio.gethdr(open(file, "rb"))

(6761, 1, 8012, 1, 'sample.au')

Get Python Standard Library now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.