Re: where do I put resources (images, audio files) when I wrote Python program?

2009-07-28 Thread Marco Mariani
Piotrek wrote: that? I think about puting these files in /usr/share/myprogram and then reading it the normal way (so the path /usr/share/myprogram would be just hardwired in my program). Is it the way one usually does it in Python program or is there any more sofisticated way? Just keep them

Re: Re: where do I put resources (images, audio files) when I wrote Python program?

2009-07-28 Thread Dave Angel
Gabriel Genellina wrote: For those read-only resources I'd use pkgutil.get_data (instead of manually parsing __file__): http://docs.python.org/library/pkgutil.html#pkgutil.get_data It's easier to manage when someone later decide to install the package as an egg file, or distribute it using

where do I put resources (images, audio files) when I wrote Python program?

2009-07-27 Thread Piotrek
Hello, I write a Python program. It will contain some images (in .png format), some audio files (as .ogg) etc. Now I think where should my installer put these files and how should I access them. What is the normal Python way of doing that? I think about puting these files in /usr/share/myprogram

Re: where do I put resources (images, audio files) when I wrote Python program?

2009-07-27 Thread mhearne808
On Jul 27, 12:43 pm, Piotrek niedzi...@gazeta.pl wrote: Hello, I write a Python program. It will contain some images (in .png format), some audio files (as .ogg) etc. Now I think where should my installer put these files and how should I access them. What is the normal Python way of doing

Re: where do I put resources (images, audio files) when I wrote Python program?

2009-07-27 Thread Dave Angel
Piotrek wrote: Hello, I write a Python program. It will contain some images (in .png format), some audio files (as .ogg) etc. Now I think where should my installer put these files and how should I access them. What is the normal Python way of doing that? I think about puting these files in

Re: where do I put resources (images, audio files) when I wrote Python program?

2009-07-27 Thread Gabriel Genellina
En Mon, 27 Jul 2009 17:53:12 -0300, Dave Angel da...@ieee.org escribió: Piotrek wrote: I write a Python program. It will contain some images (in .png format), some audio files (as .ogg) etc. Now I think where should my installer put these files and how should I access them. What is the