Including binary files in a .py file; [THANKS]
Gary Duncan
gmduncan at netspace.net.au
Sat Jun 7 17:44:23 EDT 2003
Geoffrey Talvola (and a few others ) gave useful advice ; thanks again.
> Gary Duncan wrote:
>
>>Here's what I want to do; distribute a .py file (a GUI app) with
>>an embedded (binary) .GIF file (a photo of me at 1 yo ;) rather than
>>distribute both separately. For convenience, mainly.
>>
(I should have pointed out that the GUI was Tkinter-based)
Basically I used that nifty program img2pytk.py to convert the
GIF, then inserted it into my app. canvas.create_image renders it
on the canvas. As usual, simple when you know how ;)
The attachment shows the code fragment.
- Gary
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gif.txt
URL: <http://mail.python.org/pipermail/python-list/attachments/20030608/bf2754b4/attachment.txt>
More information about the Python-list
mailing list