Distributing an executable zip file with __main__.py, how to access extra data?
Posted
by pygabriel
on Stack Overflow
See other posts from Stack Overflow
or by pygabriel
Published on 2010-05-18T17:06:52Z
Indexed on
2010/05/18
17:10 UTC
Read the original article
Hit count: 157
I'm doing a little program and I want to distribute using this recipe:
- single directory with _main_.py in it
- zip this directory and echo #!/usr/bin/env python\n > file.zip
- making it executable
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?
© Stack Overflow or respective owner