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

后端 未结 2 1858
太阳男子
太阳男子 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'
    
    0 讨论(0)
  • 2021-01-31 14:30

    How about platform

    it gives you

    platform.python_implementation()
    
    0 讨论(0)
提交回复
热议问题