Difference between python3 and python3m executables

What is the difference between /usr/bin/python3 and /usr/bin/python3m ?

I watch them on Ubuntu 13.04, but Google assumes that they exist in other distributions as well.

Two files have the same md5sum, but do not seem to be symbolic links or hard links; two files have different inode numbers returned by ls -li , and testing find -xdev -samefile /usr/bin/python3.3 does not return any other files.

Someone asked a similar question in AskUbuntu , but I wanted to know more about the difference between the two files.

+64
May 21 '13 at 17:19
source share
2 answers

The loan for this refers to chepner , indicating that I already have a link to the solution.

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

- c-pydebug (flag: d)

- c-pymalloc (flag: m)

- with wide unicode (flag: u)

through PEP 3149 .

As for the m flag, this is what Pymalloc is:

Pymalloc, a specialized object distributor written by Vladimir Marangozov, was added in Python 2.1. Pymalloc is designed to be faster than the malloc () system and have less memory overhead for distribution patterns typical of Python programs. The allocator uses C malloc () to get larger memory pools, and then executes smaller memory requests from these pools.

via What's New in Python 2.3

Finally, these two files can be tightly attached to some systems. Although the two files have different inodes on my Ubuntu 13.04 system (so they are different files), the comp.lang.python post from two years ago shows that they were once tightly bound.

+60
May 21 '13 at 18:48
source share

Python 2 and Python 3 are widely used. The reason there are two versions is because Python 3 introduced several new keywords. This would mean that Python 2 code compiled using the Python 3 compiler could break if the variable name, for example, matches the Python 3 keyword. The decision about what to do depends on your situation, but in general new projects should probably use Python 3.

For the part after the "dot", Python 2 will refer to the latest version of Python 2 (for example, 2.7), and Python 3 will refer to the latest version 3.5. The usual "Python" links to Python 2. I don’t know what happens inside the compilers, but Python 3.5 and Python 3.5m have separate executables, but they are identical in byte-byte on my Ubuntu 16.04.

-9
Sep 11 '16 at 1:38
source share



All Articles