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
result = nod.open_disc_from_image("game.iso")
if not result:
raise Exception("Could not open game.iso")
disc, is_wii = result
data_partition = disc.get_data_partition()
if not data_partition:
raise Exception("Could not find a data partition in the disc.")
def progress_callback(path, progress):
print("Extraction {:.0%} Complete; Current node: {}".format(progress, path))
context = nod.ExtractionContext()
context.set_progress_callback(progress_callback)
if not data_partition.extract_to_directory("dir_out", context):
raise Exception("Could not extract to 'dir_out'")
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)
ret = disc_builder.build_from_directory("dir_out")
if ret != nod.BuildResult.Success:
raise Exception("Failure building the image: code {}".format(ret))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nod-0.1.6.tar.gz
(90.2 kB
view details)
Built Distributions
nod-0.1.6-cp37-cp37m-win_amd64.whl
(382.0 kB
view details)
nod-0.1.6-cp36-cp36m-win_amd64.whl
(368.7 kB
view details)
File details
Details for the file nod-0.1.6.tar.gz
.
File metadata
- Download URL: nod-0.1.6.tar.gz
- Upload date:
- Size: 90.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e501990eff91d2dfbc0e55768b4665e7a1d3a3a80667d84c44cc0afefff114a9 |
|
MD5 | ff3f6e4521c23309b193f533b52ce425 |
|
BLAKE2b-256 | 5841fbca246056023d706cca83f946cdc87cab5d0259305e3dbc49b5cfaab109 |
File details
Details for the file nod-0.1.6-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: nod-0.1.6-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 382.0 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 623b2d215173481a26fbee48e64bc31bdf580e403ac281aecfbf140330cf29db |
|
MD5 | 6d09199963586f49e466c19d86fa4839 |
|
BLAKE2b-256 | 091cb75ef81007007e9d9f02a79abba2b3c85714e7e7608ca5e82b600c5fd0f8 |
File details
Details for the file nod-0.1.6-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: nod-0.1.6-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 368.7 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d0ee966442baad511bb7783c900996a5d3c0a33a698fb4553f16d67a3845451 |
|
MD5 | 740f837f6473a44f810895dc3031c6f0 |
|
BLAKE2b-256 | f61acc54a357bcae3823680ef977eac68726afb64b61e71f030f5418df4dcf1f |