StormLib-based Python MPQ bindings
C++ Python C
Latest commit d6f4745 May 14, 2016 @jleclanche jleclanche Release 1.1.1
Permalink
Failed to load latest commit information.
mpq Fix a memory leak in SFileReadFile binding May 8, 2016
.editorconfig
CONTRIBUTING.md
LICENSE Add LICENSE, CONTRIBUTING.md and editorconfig files Apr 16, 2016
MANIFEST.in
README.md
setup.py

README.md

python-mpq

Python bindings for Ladislav Zezula's StormLib.

Usage

Reading MPQs

import mpq
f = mpq.MPQFile("base-Win.MPQ")

if "example.txt" in mpq:
    print(mpq.open("example.txt").read())

Patching MPQs

Modern MPQs support archive patching. The filename usually contains the from and to build numbers.

f.patch("hs-6024-6141-Win-final.MPQ")

Writing MPQs

Writing MPQs is not supported.

License

This project is licensed under the terms of the MIT license. The full license text is available in the LICENSE file.