On Tue, 19 Nov 2019 05:09:07 +1100, Chris Angelico wrote: > On Tue, Nov 19, 2019 at 5:06 AM Wildman via Python-list > <python-list@python.org> wrote: >> >> On Sun, 17 Nov 2019 18:27:45 +0000, Barry Scott wrote: >> >> >> On 12 Nov 2019, at 20:24, Wildman via Python-list >> >> <python-list@python.org> wrote: >> >> >> >> Yes, I prefer to envoke env in the shebang line instead of >> >> depending on the path. Paths can change especially in a >> >> multi-user system but env will always know where to find >> >> the executable. >> > >> > The path to python will not change surely? >> >> In Linux, being a multi-user OS, the path is not global or >> system wide. The path can be different for different users. >> This is done by adding an EXPORT command to ~/.bashrc. >> >> > Because you are installing from a deb you know the exact path to the >> > python you >> > need to use. There is no need to use the /usr/bin/env to search the path >> > and >> > potential break your code, because a version of python that you do not >> > expect is on >> > the path. >> > >> > Barry >> >> I don't understand. The deb does not install python so I >> fail to see how I would know the exact path. >> >> As to env breaking my code, never heard of such a thing. >> > > The deb should depend on an appropriate Python package. Then you can > assume and expect that this version of Python is installed. > > ChrisA
Yes, of course, python(3) is listed as a "depends" in the deb control file. That does insure that python is installed but in no way does that tell me the path of the python executable. -- <Wildman> GNU/Linux user #557453 "Be at war with your vices, at peace with your neighbors and let every new year find you a better man." -Benjamin Franklin -- https://mail.python.org/mailman/listinfo/python-list