Difference Between Python3 and Python3M Executables

Difference between python3 and python3m executables

Credit for this goes to chepner for pointing out that I already had the link to the solution.

Python implementations MAY include additional flags in the file name
tag as appropriate. For example, on POSIX systems these flags will
also contribute to the file name:

--with-pydebug (flag: d)

--with-pymalloc (flag: m)

--with-wide-unicode (flag: u)

via PEP 3149.

Regarding the m flag specifically, this is what Pymalloc is:

Pymalloc, a specialized object allocator written by Vladimir
Marangozov, was a feature added to Python 2.1. Pymalloc is intended to
be faster than the system malloc() and to have less memory overhead
for allocation patterns typical of Python programs. The allocator uses
C's malloc() function to get large pools of memory and then fulfills
smaller memory requests from these pools.

via What's New in Python 2.3

Finally, the two files may be hardlinked on some systems. While the two files have different inode numbers on my Ubuntu 13.04 system (thus are different files), a comp.lang.python post from two years ago shows that they once were hardlinked.

What is the m behind python version like python3.6m

The version ending with m is compiled with a very specialized version of the C function malloc, tailored to be faster in a python application.

For more info see: Difference between python3 and python3m executables

What's the difference between python3.x and python3.xm

What does the m stand for in python3.6m?

It signifies that Python was configured --with-pymalloc which enables a specialized implementation for allocating memory that's faster than the system malloc.

How does it differ to non m version?

The non m version is, obviously, not configured with it.

In which case would I prefer to use python3.6m rather than python3.6?

Probably most usefull when writing C extensions, in general it shouldn't be something you should worry about.

What's with all those python* executables?

The existing questions' answers solved most part of my confusion.

The suffix letters indicates the "ABI version" for the specific build of the CPython implementation, which one can take a look at this GitHub commit

As for the 'w' flag in the 2.x version, it's all explained in the man page:

pythonw -- run python script allowing GUI

...

Actually, since Python 2.5, the normal python also allows GUI access, so python and pythonw are now interchangeable.

One can also find discussion for it on Bytes.com

The python*-config programs are used for building programs that uses python, it's a bit like the "pkg-config" application, specialized for python.



Related Topics



Leave a reply



Submit