What's the difference between python and python shell?
Python Shell / Idle
Python Shell
If you have more questions like this it's better to post them on learnpython. Be sure to format your code for reddit or use a site like pastebin. Also, include which version of python and what OS you are using.
More on reddit.comWhat is an IDE? What is a Python interpreter? So confused about getting started.
What you NEED to run python:
-
any text editor, to create/edit plain-text python (.py) files. There are tons of text editors out there but any PC should come with some form of basic text editing software.
-
python interpreter, the piece of software that takes your .py file and correctly reads it as python code. Normally the interpreter is accessible through a command line, using the syntax
python path-to-your-python-text-fileto interpret a file as python code.
What you CAN use to work with python more effectively:
-
a python shell, i.e. that place with the
>>>prompt. This is just the python interpreter running in "real-time". You can type any python expression and the shell will return whatever that expression evaluates to (type 2 + 2 to output 4, for example). This is mostly used to test python syntax and snippets while editing your code in a text editor. By default, python comes with the IDLE python shell but there are tons out there. -
an IDE (short for integrated development environment), which is basically a combination of the above features. An IDE is a software that combines a text editor, python interpreter, python shell, filesystem explorer, etc into one window, so you can have everything you need right there. They normally come with extra features as well, such as autocomplete and quick search on the official python documentation. IDEs can help out a lot, but they are not at all required to write/use python. I actually recommend you to not use an IDE until you have a better grasp on text editing/python interpreter, since they can be overwhelming at first.
Videos
» npm install python-shell
I recently learnt that shell is a programming language (here) and terminal is a graphical emulator. We use the shebang #!to tell the shell what to use to run the script. For example, if we want to run a py script
#!/usr/bin/env python
If shell itself is another programming language, why do we have to "tell" the shell what interpreter to use if we are using some other language like python? Do all the languages parse everything to shell and then run the script? What's the difference between python and python shell? Does every language have a shell?