Hacker News new | ask | show | jobs
by rdtsc 4400 days ago
They do. But python3 is not the default python.

Download a python script run it and it will run on Python 2.7.6.

Yes that OP meant to say that because he clarified it later. But I don't see how his original comment of:

> most Linux distros are at least at Python 3.2

implies that. To me that says 3.2+ ships as the default version of Python.

2 comments

> python3 is not the default python.

The post I was responding to talked about books on Python for students, presumably students studying programming. Python 3 doesn't need to be the default python for students studying programming to use it; it just needs to be available. If the post had been talking about, say, sysadmins, that would be a different story.

I think it's recommended for distros to modify the shebang to /usr/bin/env python3 for script that are supposed to run under python 3, although this does pose a problem for scripts that want to run under both without modification. If the distro ships with python3 and most of the system scripts run under python3 I'd say its the default.Ubuntu for one is planning on not shipping a python2 or /usr/bin/python binary by default(although it will still be in repos) eventually.