Skip to main content

Python bindings for the nod library.

Project description

py-nod

Python 3.6 bindings for the NOD, a library for traversing, dumping, and authoring GameCube and Wii optical disc images.

Usage

Unpacking

import nod

def progress_callback(path, progress):
    if args.verbose:
        print("Extraction {:.0%} Complete; Current node: {}".format(progress, path))

context = nod.ExtractionContext()
context.set_progress_callback(progress_callback)

try:
    disc, is_wii = nod.open_disc_from_image("game.iso")
    data_partition = disc.get_data_partition()
    if not data_partition:
        raise RuntimeError("Could not find a data partition in the disc.")
    data_partition.extract_to_directory("dir_out", context)
except RuntimeError as e:
    raise Exception("Could not extract disc at 'game.iso' to 'dir_out': {}".format(e))

Packing

import nod

if nod.DiscBuilderGCN.calculate_total_size_required("dir_out") == -1:
    raise Exception("Image built with given directory would pass the maximum size.")

def fprogress_callback(progress: float, name: str, bytes: int):
    print("\r" + " " * 100, end="")
    print("\r{:.0%} {} {} B".format(progress, name, bytes), flush=True)

disc_builder = nod.DiscBuilderGCN("game.iso", fprogress_callback)
try:
    disc_builder.build_from_directory("dir_out")    
except RuntimeError as e:
    raise Exception("Failure building the image: {}".format(e))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

nod-1.0.3-cp37-cp37m-win_amd64.whl (397.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

nod-1.0.3-cp36-cp36m-win_amd64.whl (397.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

nod-1.0.3-cp36-cp36m-manylinux2010_x86_64.whl (701.2 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

nod-1.0.3-cp35-cp35m-manylinux2010_x86_64.whl (699.6 kB view details)

Uploaded CPython 3.5m manylinux: glibc 2.12+ x86-64

File details

Details for the file nod-1.0.3-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for nod-1.0.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7e1d705ec7e12bd1d0dc74028ac0c4c8fff478ad28083e7d2108e878d7571a37
MD5 c95fe5bff4b6a2fc84992eab45e99320
BLAKE2b-256 72485ba22efd88dd1a9ff5575179ac2e06ca13800b14a0e952160eddff2c7e9f

See more details on using hashes here.

File details

Details for the file nod-1.0.3-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for nod-1.0.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 4dbc56cd3845fae6182e2253e2b383373fe8205d0f663ec8024cf4415485fd79
MD5 3df0cfcb44d19c1f006307dc9b0606e2
BLAKE2b-256 7bd1109ca8de6b2d8845a146348572c8cdd46e323fd952b4642b11e91f73ba83

See more details on using hashes here.

File details

Details for the file nod-1.0.3-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for nod-1.0.3-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 dff1dd8dba10596d72fa01defed0ecbf8eb920dc35c988c06ddb522d3428ebe3
MD5 2aa15b563f1ed362e6f616af6d320bb7
BLAKE2b-256 a1aa3e28abd7ab3cf252893bd52c0eee279b1c1ea4f5065f9347fd0c6b9bc052

See more details on using hashes here.

File details

Details for the file nod-1.0.3-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for nod-1.0.3-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ab912b680c6b8606158ee6bd40ed345d87ec3e64cfcc623215d7e96a324b41c0
MD5 73002281036f6f8da28ac05d941e1dc8
BLAKE2b-256 065c65dfb1a07283099e1899516d38683e466b8984eba42ad7ba1a9b11c775d3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page