How can I tell which python implementation I'm using?

后端 未结 2 1908
太阳男子
太阳男子 2021-01-31 13:50

Python has a few different implementations: CPython, Jython, PyPy, etc. I want to programmatically determine which implementation my code is running on. How can I do that?

2条回答
  •  情深已故
    2021-01-31 14:22

    In [50]: import platform    
    In [52]: platform.python_implementation()
    Out[52]: 'CPython'
    

提交回复
热议问题