0

I've written a python program with tkinter and it has an icon file, icon.gif. In the program, the icon is referenced as if it was in the current working directory (while testing, it was). But when i try to install the program to my computer (I'm on a linux machine), using python setup.py install, the program complains about there being no icon file.

This is my reference to the icon file:

root.tk.call('wm','iconphoto', root._w, tk.Image("photo", file="icon.gif"))

This is my setup.py:

#!/usr/bin/env python

from distutils.core import setup

includefiles = ["icon.gif"]

setup(name='my-program',
      version='alpha',
      scripts=["my-program"],
      data_files=[('bitmaps', ['icon.gif'])],
     )

So basically I'd like to know either: 1. How to make sure that the image is copied into the correct place. 2. how to refer to my icon image in the program so that wherever the distutils puts it, it works.

Jaz
  • 53
  • 8

0 Answers0