0

I am running python on Linux. I want to know the script which runs the python interpreter.

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?. I want to know the location of it.

1
  • 2
    which python is the standard unix way to do this. Of course, there is no reason to assume it will be a script. Commented Aug 2, 2013 at 10:23

2 Answers 2

1

It's not a python script you can simply get and modify as any .py file. 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).

You can read up the details on http://docs.python.org/devguide/

Sign up to request clarification or add additional context in comments.

3 Comments

could you be more specific on where to find the sources pertaining to the 'Interactive interpreter'
The given URL shows you how to get the C source code of the python interpreter. You can also try python.org/download
I am not sure what do you consider as "interactive interpreter", but if you are after the I/O part then here you go hg.python.org/cpython/file/00695551d721/Modules/main.c
0

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. The path to the binary can be found by the Linux command:

which python

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.