I'm doing a little program and I want to distribute it using this recipe:
__main__.py
in it#!/usr/bin/env python
The problem is that in this package I have also extra files (I'm using pygtk toolkit and I need images and ui xml files). When I try to access these files I have the error that the resource is unavailable (the path that I'm trying to open is something like file.zip/gui/gui.ui ).
How can I handle this situation?
I figured out by myself, It's sufficient to use pkgutil.get_data to access the data inside a package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With