There is an official way to do it! :-) Please have a look at
http://docs.python.org/2/library/platform.html#platform.python_implementation
Returns a string identifying the Python implementation. Possible return values are: ‘CPython’, ‘IronPython’, ‘Jython’, ‘PyPy’.
New in version 2.6.
I did not know that before.
Old answer:
There probably is no standardized interface, but you can use some educated guessing, based on e.g. sys.executable
(http://docs.python.org/2/library/sys.html#sys.executable), and sys.version
. Furthermore, some interpreters for sure provide features that are specific to them, which you can make use of.