Accessing application data portably
Steve Holden
steve at holdenweb.com
Wed Aug 23 22:12:40 EDT 2006
Tom E H wrote:
> My Python application includes some data files that need to be accessed by
> modules I distribute with it.
>
> Where can I put them, and how should I arrange my code, so that it works
> across platforms?
>
> On Linux, I could install the data to "/usr/lib/myprogram/datafile", and
> on Windows to "datafile" relative to where the executable (made by
> py2exe) is installed. Then I could detect the operating system, and choose
> appropriately.
>
> To be that explicit seems undesirable. Any cleverer ideas?
>
> Tom
>
> (Please CC me on replies: I'm not subscribed. The From address is munged)
>
If you aren't ubscribed then the only person who is going to copy you on
email is someone complaining about your presumptuousness in assuming
they'd happily want to spend time trimming your email address just so
you won't be bothered by the spam plagie.
Sorry, the question seems to have completely gone out of my head ...
regards
Steeve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list
mailing list