Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Python console and Terminal in PyCharm

I am a beginner in Python. I started using PyCharm recently but I don't know what's the difference between Terminal and console. Some of the commands in Terminal do not work in console.

like image 285
Wrogero Avatar asked Jul 02 '20 23:07

Wrogero


People also ask

What is the PyCharm console?

The PyCharm console on the other hand, is a more advanced version of the "Python Console", which allows you to run bits of Python. It is also called the Python REPL or R ead E val P rint L oop

What happens when you run a code in PyCharm?

When you RUN a code in PyCharm it will start up in RUN section bellow. Next to it there is a Python Console and a terminal. However for example this code will not happen in Python Console but it will clear the screen in Terminal.

What is the difference between the terminal and the Python console?

The terminal is your bash or windows command line where you can execute shell or windows "cmd.exe" commands like: $ cd / $ ls $ echo "Hello world!!!" The Python console is your interactive console where you can execute python code >>> x, y = 1, 2 >>> x 1 >>> y 2 >>> x + y 3 >>> print ("Hello world!!!")

What is the difference between PyCharm and terminal?

Before we can talk about the differences, we need to talk about what the two are in practice. The Terminal, essentially replaces your command-prompt/power-shell on windows and the terminal app on Mac, giving you a way to access them without leaving PyCharm.


2 Answers

Before we can talk about the differences, we need to talk about what the two are in practice. The Terminal, essentially replaces your command-prompt/power-shell on windows and the terminal app on Mac, giving you a way to access them without leaving PyCharm.

enter image description here

The PyCharm console on the other hand, is a more advanced version of the "Python Console", which allows you to run bits of Python. It is also called the Python REPL or Read Eval Print Loop

enter image description here

You can invoke the Python Console from the terminal as well.

like image 98
Games Brainiac Avatar answered Oct 26 '22 04:10

Games Brainiac


The terminal is your bash or windows command line where you can execute shell or windows "cmd.exe" commands like:

$ cd /
$ ls
$ echo "Hello world!!!"

The Python console is your interactive console where you can execute python code

>>> x, y = 1, 2
>>> x
1
>>> y
2
>>> x + y
3
>>> print("Hello world!!!")
Hello world!!!
like image 1
rostIvan Avatar answered Oct 26 '22 03:10

rostIvan