How can I get the Python compiler string programmatically?

The Python Interpreter Entry Message contains a string that describes the compiler.

For example on my machine, the Entry Message says:

Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32

Where [MSC v.1500 64 bit (AMD64)] is the compiler string.

How can i get this string programmatically?

Upvotes: 5

Views: 78

Answers (1)

srowland
srowland

Reputation: 1705

You can get information like this from the platform module, for example:

import platform
platform.python_compiler()

gives me:

'GCC 4.9.2'

Upvotes: 5

Related Questions