Can I detect if my code is running on cPython or Jython?
The most clear-cut way is:



import platform
platform.python_implementation()



'CPython'
By default, most of the time the underlying interpreter is CPython only which is also arguably the most  efficient one :)
I'm working on a small django project that will be deployed in a servlet container later. But development is much faster if I work with cPython instead of Jython. So what I want to do is test if my code is running on cPython or Jython in my settiings.py so I can tell it to use the appropriate db driver (postgresql_psycopg2 or doj.backends.zxjdbc.postgresql). Is there a simple way to do this?