Mailinglist Archive: opensuse-factory (914 mails)

< Previous Next >
Re: [opensuse-factory] Switching default python to Python 3
Can we make /usr/bin/python smart to know if it was started as part of a
shebang
and output a warning?

What is to be preferred against shebang? For me python2 on TW does not work any more for some time. h5py and vtk are appear to me to be not supported any more. I modified our scripts to run with python3 and python2 (for my colleagues, some on quite old distros with python3 not installed).

So I cannot explicitly call pyhton2 or python3 in shebang, which makes no sense as the scripts run on both.

The dirty fix for me is, to shebang #!/usr/bin/env python
and have my ~/bin/python link to /usr/bin/python3

So if you want to "enforce" the explicit selection of python2 and python3 I vote against it.

BTW, vtk cannot exist concurrently for python2 and python3 AFAIK.

Fabian
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >