Maybe you need to read more up to date books. The latest release is Python 3.4, and even most Linux distros are at least at Python 3.2.
Maybe you need to read more up to date books. The latest release is Python 3.4, and even most Linux distros are at least at Python 3.2.
The other 11 in order of popularity are #1 Mint, #2 Ubuntu, #3 Debian, #4 Mageia, #5 Fedora, #6 openSUSE, #7 elementary OS, #9 Zorin OS, #10 Puppy Linux, #11 PCLinuxOS, and #12 CentOS.
Most Linux distros use Python 2.
I would take 3.4 if someone else spent the time testing and validating my code against but I just don't have the time to invest because I just don't see an upside to it at the moment.
Why are you spreading lies? You are hurting your cause (advocating Python 3).
Let's take a look at latest Ubuntu:
$ cat /etc/issue
Ubuntu 14.04 LTS \n \l
$ python --version
Python 2.7.6
How about the popular server distro CentOS 6? $ cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
$ python --version
Python 2.6.6
What exactly are these "most" Linux distros everyone is using that I haven't heard of?So what pdonis was saying is, as far as I can tell, true.
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.
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.
$ python3 --version
...instead.It's easy to specify what the minimum version of Python you want to support is. Even if there's syntax which is incompatible with Python 2 in the file, a hashbang that specifies `python3` is pretty clear.
Why are you assuming the worst possible intent on my part, instead of asking what I meant?
I meant the distros have Python 3 available, not that they make it the default that /usr/bin/python points to. Ubuntu has had Python 3 available for quite a number of releases; I run 12.04 which has Python 3.2 (and I've had it installed since I installed Ubuntu). According to the release notes[1], Ubuntu 14.04 makes Python 3.4 available, and work is ongoing to make it the default Python for Ubuntu. They also advise porting to Python 3.
It looks like CentOS makes Python 3.2 available, but I can't be sure from their online documentation.
I don't know how else to interpret that besides "the base version of python in those latest distros is at least 3.2"
Shipping it as an "alternative" just splits the library world into to. So that is not a distro being "at" a python version.
> It looks like CentOS makes Python 3.2 available,
It does. Do all the python-* libraries work with it. Or do I have to install those separately?
Then you could have said that, or asked if there was another way to interpret it, instead of starting with "why are you spreading lies".
> It does. Do all the python- libraries work with it. Or do I have to install those separately?*
If CentOS works like Ubuntu, then there will be python3-* libraries for use with Python 3.
But I also didn't say you are spreading lies maliciously. You can spread them unknowingly via mis-communication.
I could post something like "Large parts of the Linux kernel are written in C++". And it would be spreading lies. But it could be just be me being confused as well or thinking that a C++ compiler will compile C and that C is a largely a subset of C++.
My objection wasn't that you imputed malice; it was that you went straight to "spreading lies" instead of expressing uncertainty about what I meant. And you were wrong about what I meant.
> You can spread them unknowingly via mis-communication.
Which, since you were wrong about what I meant, is what you did when you said I was "spreading lies".