[PyQt] pyrcc4 query
clement.mairet at leapingtiger.org
Mon Apr 5 12:52:50 BST 2010
Anshul Jain wrote:
> Please tell me if there is any other possible way to create a resource
> file without the pyrcc4 command.
Wondering the same thing a while back, we tried coming up with a Python
alternative to pyrcc for the Spyrit project, mostly as an exercise to
easily package and compress our resources in a slightly smaller file
format, and allow users to do so from our application itself -- for
instance to re-generate themes and so on.
We put together our own Python implementation of pyrcc4
for convenience, which generates similar output as pyrcc4 when used with
the '--legacy' option -- our version is as yet incomplete as it doesn't
handle resource subdirectories at all, nor does it use Qt compression
yet. It does work for simpler cases, however.
You can find the code in the Spyrit sources, it works as a standalone
script but should be easy to adapt to other uses:
It's probably a suboptimal implementation, and I'd also be curious to
know of similar -- and more mature -- tools in Python.
Hope it helps,
More information about the PyQt