如何找到我的Python安装中的VM?

时间:2014-02-02 12:46:44

标签: python virtual-machine

我在我的电脑上安装了Python。如何找出它附带的VM。

是cpython还是ipython还是jpython?

2 个答案:

答案 0 :(得分:5)

import platform
platform.python_implementation()

来自文档:

platform.python_implementation()

     Returns a string identifying the Python implementation.
     Possible return values are: ‘CPython’, ‘IronPython’, ‘Jython’, ‘PyPy’.

http://docs.python.org/2/library/platform.html

答案 1 :(得分:0)

在命令提示符

中运行此命令

python -c“来自平台导入python_implementation; print python_implementation()”