On Mon, Sep 23, 2019 at 01:12:14PM -0400, Greg Wooledge wrote:
> On Mon, Sep 23, 2019 at 06:56:47PM +0200, Thomas Schmitt wrote:
> > Problem is that Richard Owlett expected it to work in the starter program
> > of the interpreter (here: /usr/bin/python) when it opens the script file
> > for reading. I assume Python developers consider this too much of Silly 
> > Walks.
> 
> If it's about shebangs, [...]

Re-reading Thomas's paragraph again, it actually sounds more like R.O.
was writing some sort of wrapper script ("A") which invokes a python
program ("B").  And for some reason, B isn't directly executable
(perhaps he forgot to chmod it, or forgot to put the shebang on it),
and so he's expecting A to search all the directories in PATH, by hand,
for a non-executable file named B, and if it finds one, to run "python
/path/to/B".

If this is indeed the case, I agree that this would be incredibly silly.

If A is supposed to call B, then:

 * B should be executable (chmod 755 or similar).
 * B should have a correct shebang, so that it can be executed.
 * B should be in a directory that's in A's PATH.  A can change the
   value of its PATH variable if necessary.

That's it!

Reply via email to