Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the Python standard library really standard?

Is the Python standard library standard in the sense that if Python is installed, then the standard library is installed too?

The documentation reads

For Unix-like operating systems Python is normally provided as a collection of packages, so it may be necessary to use the packaging tools provided with the operating system to obtain some or all of the optional components.

The standard library index only lists as optional the "Optional Operating System Services", as far as I can tell.

So, is everything else always available on a platform, if Python is installed? If not, what can be expected on the most common ones (Windows, Mac OS X, Linux)?

PS: I am teaching a Python class to graduate students, and I would love to be able to tell them that Python always comes with batteries included; this is of practical importance, for them (when they arrive in a new lab, or use a new machine, it is useful for them to know what to expect in terms of standard modules availability).

like image 972
Eric O Lebigot Avatar asked Sep 27 '10 19:09

Eric O Lebigot


1 Answers

It's not a Python issue. You can teach that the batteries are included. They are.

It's the distributions that are incomplete.

We've been unhappy with the Red Hat Enterprise Linux having old versions of Python. However, there are recipes for upgrades.

It's a common security practice to turn off all developer packages, leaving Python incomplete. This is a common situation outside Python and outside the essential Linux distribution.

Batteries are included under normal circumstances. But, it's also very easy to strip some or all of the batteries. And many organizations will -- for a variety of reasons -- create incomplete libraries.

It's not Python. It's the environments that are incomplete.

like image 148
S.Lott Avatar answered Sep 19 '22 15:09

S.Lott