https://github.com/jleclanche/python-mpq
StormLib-based Python MPQ bindings
https://github.com/jleclanche/python-mpq
mpq python
Last synced: about 1 month ago
JSON representation
StormLib-based Python MPQ bindings
- Host: GitHub
- URL: https://github.com/jleclanche/python-mpq
- Owner: jleclanche
- License: mit
- Created: 2011-12-16T14:49:05.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T16:10:46.000Z (over 4 years ago)
- Last Synced: 2025-03-19T02:19:34.986Z (2 months ago)
- Topics: mpq, python
- Language: C++
- Homepage: http://zezula.net/en/mpq/stormlib.html
- Size: 56.6 KB
- Stars: 22
- Watchers: 3
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# python-mpq
Python bindings for Ladislav Zezula's [StormLib](http://zezula.net/en/mpq/stormlib.html).
## Usage
### Reading MPQs
```py
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.```py
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.