hbc/pywii/pywii-tools/discinfo.py

29 lines
455 B
Python
Raw Normal View History

2021-03-17 15:53:31 +01:00
#!/usr/bin/env python3
2016-11-23 06:35:12 +01:00
import sys, os, os.path
import pywii as wii
wii.loadkeys()
isofile = sys.argv[1]
disc = wii.WiiDisc(isofile,readonly=True)
disc.showinfo()
partitions = disc.read_partitions()
2021-03-17 15:53:31 +01:00
parts = list(range(len(partitions)))
2016-11-23 06:35:12 +01:00
try:
pnum = int(sys.argv[2])
partitions[pnum]
parts = [pnum]
except:
pass
for partno in parts:
part = wii.WiiCachedPartition(disc,partno)
part.showinfo()
pdat = wii.WiiPartitionData(part)
pdat.showinfo()