Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57777

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

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: How to find where data files are installed for my Python program
Date 2013-10-28 00:34 +0000
References (3 earlier) <mailman.1637.1382848122.18130.python-list@python.org> <bd3ve5F6cjjU1@mid.individual.net> <CALwzidkXgAkkmE=Z=oxAXppUcKnudSQU9VcdFMRo26PEjmoXjg@mail.gmail.com> <7w7gcy9tpk.fsf@benfinney.id.au> <CAPTjJmp_npLE7xGPXPib16dTqomULRv8xOVuPGizruomnjUX3g@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1673.1382920476.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 27/10/2013 23:58, Chris Angelico wrote:
> On Mon, Oct 28, 2013 at 10:31 AM, Ben Finney <ben+python@benfinney.id.au> 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 Windows and OS/2 too. Unix is, if anything, _less_
> inclined that way - the executable segment is called "text", which
> always struck me as a bit odd.
>
>> So the separation I'm drawing attention to in the FHS has nothing to do
>> with whether the files are text files, and everything to do with whether
>> they're executable programs and code libraries.
>
> Yup. Unix does a fairly good job of blurring the line between
> "executables that can be loaded and jumped to" and "scripts that get
> loaded by an interpreter". I actually have a few scripts that take
> several levels of interpreter, something like:
>
> foo.pike
> #!/usr/local/bin/pike
>
> bar.pike:
> #!/.../foo.pike --parameter
>
> fum.pike:
> #!/.../bar.pike --otherparameter
>
> Unix will happily execute ./fum.pike as "/usr/local/bin/pike
> /.../foo.pike --parameter /.../bar.pike --otherparameter ./fum.pike".
> There's a limit on the number of interpreters (to prevent loops), but
> I haven't hit it :)
>
> There is one important place, though, where scripts are called data
> files, and that's licensing. The GPL, for instance, does NOT cover
> your scripts, even if it covers the interpreter, because *to the
> language interpreter*, your scripts are just data files. But that's
> more of a legal distinction than a filesystem hierarchical one.
>
> ChrisA
>

Quoting from another thread

"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 does Unix, 
Windows and other operating systems distinguish these with respect to 
binary, executable, code library or whatever?

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Function for the path of the script? Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-26 19:23 -0700
  Re: Function for the path of the script? Skip Montanaro <skip.montanaro@gmail.com> - 2013-10-26 21:42 -0500
  Re: Function for the path of the script? Gary Herron <gary.herron@islandtraining.com> - 2013-10-26 19:52 -0700
  Re: Function for the path of the script? Chris Angelico <rosuav@gmail.com> - 2013-10-27 14:01 +1100
    Re: Function for the path of the script? Grant Edwards <invalid@invalid.invalid> - 2013-10-28 14:49 +0000
      Re: Function for the path of the script? Chris Angelico <rosuav@gmail.com> - 2013-10-29 01:59 +1100
      Re: Function for the path of the script? rurpy@yahoo.com - 2013-10-28 21:00 -0700
        Re: Function for the path of the script? Steven D'Aprano <steve@pearwood.info> - 2013-10-29 05:27 +0000
          Re: Function for the path of the script? Grant Edwards <invalid@invalid.invalid> - 2013-10-29 14:31 +0000
  Re: Function for the path of the script? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-27 03:42 +0000
  Re: Function for the path of the script? Ben Finney <ben+python@benfinney.id.au> - 2013-10-27 15:10 +1100
    Re: Function for the path of the script? Roy Smith <roy@panix.com> - 2013-10-27 09:38 -0400
    Re: Function for the path of the script? Grant Edwards <invalid@invalid.invalid> - 2013-10-28 14:58 +0000
      Re: Function for the path of the script? Ben Finney <ben+python@benfinney.id.au> - 2013-10-29 09:50 +1100
        Re: Function for the path of the script? Grant Edwards <invalid@invalid.invalid> - 2013-10-29 14:26 +0000
  How to find where data files are installed for my Python program (was: Function for the path of the script?) Ben Finney <ben+python@benfinney.id.au> - 2013-10-27 15:28 +1100
    Re: How to find where data files are installed for my Python program (was: Function for the path of the script?) rurpy@yahoo.com - 2013-10-26 22:18 -0700
    Re: How to find where data files are installed for my Python program Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-10-27 20:58 +1300
      Re: How to find where data files are installed for my Python program Ian Kelly <ian.g.kelly@gmail.com> - 2013-10-27 09:50 -0600
      Re: How to find where data files are installed for my Python program Ben Finney <ben+python@benfinney.id.au> - 2013-10-28 10:13 +1100
      Re: How to find where data files are installed for my Python program Ben Finney <ben+python@benfinney.id.au> - 2013-10-28 10:31 +1100
      Re: How to find where data files are installed for my Python program Chris Angelico <rosuav@gmail.com> - 2013-10-28 10:58 +1100
      Re: How to find where data files are installed for my Python program Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-28 00:34 +0000
      Re: How to find where data files are installed for my Python program Chris Angelico <rosuav@gmail.com> - 2013-10-28 17:51 +1100
        Re: How to find where data files are installed for my Python program Roy Smith <roy@panix.com> - 2013-10-28 08:51 -0400
          Re: How to find where data files are installed for my Python program Chris Angelico <rosuav@gmail.com> - 2013-10-29 00:06 +1100
  Re: How to find where data files are installed for my Python program (was: Function for the path of the script?) Chris Angelico <rosuav@gmail.com> - 2013-10-27 16:49 +1100
  Re: Function for the path of the script? Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-28 15:57 -0700
  Re: Function for the path of the script? Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-28 22:56 -0700

csiph-web