Check the value of sys.implementation.name.
name is the implementation’s identifier, e.g.
'cpython'. The actual string is defined by the Python implementation, but it is guaranteed to be lower case.
For IronPython sys.implementation.name is 'ironpython', for Python it is 'cpython'.