title: How to determine the python is mingw or official build?
body: <p>I am using python in the MSYS2 environment. The MSYS2 has its own built MINGW python version. Also I can install the official python from the www.python.org.</p>
  
  <p>Here is the problem: If I want to write a python code need to know the python version is MINGW or the official one, how can I do it?</p>
  
  <p>Here are some ways I can image.</p>
  
  <ol>
  <li>Use the "sys.prefix" object. It tells the installation directory. the MSYS2 usually installed in the directory X:\msys2\.... and the official one install in the X:\Python27\ as default. But users may change the installation directory. So this is not a good way.</li>
  <li>Use the "sys.version" object can get the version strings show with the compiler name. It shows the MINGW python compiled by GCC, the official one compiled by MSC. But there may have some possibility that there is an other version's python also built by GCC or MSC.</li>
  </ol>
  
  <p>Is there any more elegant way can do this?</p>