Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.015s · 20.1MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.2s · import 0.014s · 21MB
22MB installed
● package 22MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
la_panic
✓ import la_panic
✗ import subprocess
This quickstart demonstrates how to interact with `la-panic` using Python's `subprocess` module, as it is primarily a command-line interface tool. It creates a dummy `.ips` file and then attempts to parse it. In a real application, replace `dummy_panic.ips` with the actual path to your AppleOS kernel panic report.
import subprocess
import os
# Create a dummy .ips file for demonstration purposes
# In a real scenario, you would replace 'dummy_panic.ips' with your actual kernel panic file.
dummy_ips_content = """
panic(cpu 0 caller 0xfffffff012345678): "some kernel panic message"\n
Backtrace (CPU 0), Frame : Return Address\n
<Some raw panic data>\n
"""
dummy_file_path = "dummy_panic.ips"
with open(dummy_file_path, "w") as f:
f.write(dummy_ips_content)
try:
# Example: Running the parser tool
# Replace 'dummy_panic.ips' with the path to your actual .ips file.
print(f"Attempting to parse: {dummy_file_path}")
result = subprocess.run(
['la_panic', 'parser', 'parse', dummy_file_path],
capture_output=True, text=True, check=True
)
print("\n--- Parser Output ---")
print(result.stdout)
if result.stderr:
print("\n--- Parser Errors (Stderr) ---")
print(result.stderr)
except FileNotFoundError:
print(f"Error: The 'la_panic' command was not found. Is the library installed and in your PATH?")
except subprocess.CalledProcessError as e:
print(f"Error during parsing: {e}")
print(f"Stdout: {e.stdout}")
print(f"Stderr: {e.stderr}")
except Exception as e:
print(f"An unexpected error occurred: {e}")
finally:
# Clean up the dummy file
if os.path.exists(dummy_file_path):
os.remove(dummy_file_path)
print(f"Cleaned up {dummy_file_path}")
la-panic --version
Upgrade
Version history
0.5.0latest on PyPI · released Nov 12, 2023
Audit
Dependencies
No dependency data recorded yet.