libuuu Python Wrapper

1.5.243 · active · verified Thu Apr 16

libuuu is a Python wrapper for the native NXP libuuu library, a universal update utility primarily used for flashing and interacting with NXP i.MX series embedded devices. It provides Python bindings to the C library's functionalities, allowing programmatic control over device flashing and communication. The library generally follows the versioning of the underlying C library, with releases occurring periodically to match new `libuuu` versions.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import the `Uuu` class and execute a simple command using its `cmd` method. It highlights the importance of passing command arguments as a list of strings and provides a common pattern for handling the underlying native library dependency.

from uuu import Uuu
import os

# Optionally set the path to the native libuuu library if not in standard locations
# os.environ['UUU_LIB_PATH'] = '/path/to/your/libuuu.so'

try:
    # Initialize the Uuu wrapper
    lib_uuu = Uuu()
    
    # Run a uuu command, e.g., get help
    # Arguments must be passed as a list of strings
    print("Running uuu -h...")
    return_code = lib_uuu.cmd(['-h'])
    print(f"Command exited with code: {return_code}")

    # Example of a command that might not apply without hardware
    # print("Running uuu --version...")
    # return_code = lib_uuu.cmd(['--version'])
    # print(f"Command exited with code: {return_code}")

except Exception as e:
    print(f"An error occurred: {e}")
    print("Ensure the native libuuu shared library is installed and accessible.")

view raw JSON →