Re: How to find where data files are installed for my Python program

2013-10-28 Thread Chris Angelico
On Mon, Oct 28, 2013 at 11:51 PM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> If it starts with "#!/usr/bin/python", it'll get >> dropped through to Python for execution. > > Even better (for most purposes), use "#!/usr/bin/env python". What that > does is (slight handwave here

Re: How to find where data files are installed for my Python program

2013-10-28 Thread Roy Smith
In article , Chris Angelico wrote: > If it starts with "#!/usr/bin/python", it'll get > dropped through to Python for execution. Even better (for most purposes), use "#!/usr/bin/env python". What that does is (slight handwave here) search your PATH to find the same version of Python you woul

Re: How to find where data files are installed for my Python program

2013-10-27 Thread Chris Angelico
On Mon, Oct 28, 2013 at 11:34 AM, Mark Lawrence wrote: > "What is the difference between "script" code (like Javascript and visual) > made for the screen (where such magic values are utilized) and compiled > source (made for the machine)?" > > This obviously impacts on the discussion above, so how

Re: How to find where data files are installed for my Python program

2013-10-27 Thread Mark Lawrence
On 27/10/2013 23:58, Chris Angelico wrote: On Mon, Oct 28, 2013 at 10:31 AM, Ben Finney wrote: It is an unfortunate artefact of Unix history that “binary” has an established connotation of “executable”, encompassing even executable text files. That's a lot broader than Unix - people talk abou

Re: How to find where data files are installed for my Python program

2013-10-27 Thread Chris Angelico
On Mon, Oct 28, 2013 at 10:31 AM, Ben Finney wrote: > It is an unfortunate artefact of Unix history that “binary” has an > established connotation of “executable”, encompassing even executable > text files. That's a lot broader than Unix - people talk about "binaries" meaning executables in Windo

Re: How to find where data files are installed for my Python program

2013-10-27 Thread Ben Finney
Ian Kelly writes: > I don't see why Python files should be treated any differently than > other non-binary executables, e.g. shell scripts. It is an unfortunate artefact of Unix history that “binary” has an established connotation of “executable”, encompassing even executable text files. So the

Re: How to find where data files are installed for my Python program

2013-10-27 Thread Ben Finney
Gregory Ewing writes: > Ben Finney wrote: > > On systems conforming to the Filesystem Hierarchy Standard, it's > > forbidden: programs go in a platform-specific location > > http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGANDPA>, > > while platform-independen

Re: How to find where data files are installed for my Python program

2013-10-27 Thread Ian Kelly
On Sun, Oct 27, 2013 at 1:58 AM, Gregory Ewing wrote: > Ben Finney wrote: >> >> On systems conforming to the Filesystem Hierarchy Standard, it's >> forbidden: programs go in a platform-specific location >> >> http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGAND

Re: How to find where data files are installed for my Python program

2013-10-27 Thread Gregory Ewing
Ben Finney wrote: On systems conforming to the Filesystem Hierarchy Standard, it's forbidden: programs go in a platform-specific location http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGANDPA>, while platform-independent data files go in a separate location h

Re: How to find where data files are installed for my Python program (was: Function for the path of the script?)

2013-10-26 Thread Chris Angelico
On Sun, Oct 27, 2013 at 3:28 PM, Ben Finney wrote: > Chris Angelico writes: > >> It's very common to want to know what directory you're in - it's a >> good way to find data files. > > That's a naive way to do it (though it's often good enough, for a > program only used on one system). I never sa

Re: How to find where data files are installed for my Python program (was: Function for the path of the script?)

2013-10-26 Thread rurpy
On 10/26/2013 10:28 PM, Ben Finney wrote: > Chris Angelico writes: > >> It's very common to want to know what directory you're in - it's a >> good way to find data files. > > That's a naive way to do it (though it's often good enough, for a > program only used on one system). > > For programs i