[英]The script which runs python in shell
I am running python on Linux. 我在Linux上运行python。 I want to know the script which runs the python interpreter. 我想知道运行python解释器的脚本。
Meaning, Whenever i run the command python
on a linux shell, a Python prompts opens and get input from keyboard and take those inputs to the underlying python interpreter.I want to know which shellscript (or python script) does this?. 意思是,每当我在linux shell上运行python
命令时,Python提示都会打开并从键盘获取输入,并将这些输入带到底层python解释器中。我想知道是哪个shellscript(或python脚本)执行的? I want to know the location of it. 我想知道它的位置。
It's not a python script you can simply get and modify as any .py file. 这不是一个Python脚本,您可以简单地将其获取并修改为任何.py文件。 In order to play around with interactive interpretter you will have to download the python sources and go through them, as it's a build-in part of it (for performance sake). 为了使用交互式解释器,您将必须下载python源并仔细检查它们,因为它是其中的内置部分(出于性能考虑)。
You can read up the details on http://docs.python.org/devguide/ 您可以在http://docs.python.org/devguide/上阅读详细信息
The answer to your question as asked is None ! 您所提出的问题的答案是“ 无” !
The Linux default python prompt is part of the python interpreter and is a binary file not a python script or shell script. Linux默认的python提示符是python解释器的一部分,并且是二进制文件, 而不是 python脚本或shell脚本。 The path to the binary can be found by the Linux command: 二进制文件的路径可以通过Linux命令找到:
which python
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.