r/learnpython • u/KungfuleEAE • Jan 06 '26
Should i write code on an Python Interpreter or should i do it on Terminal
I decided to start learning Python lately and i have been using the online interpreter since it felt easier, but i have seen many people using the Terminal or notepads. The problem is i dont understand how to run or highlight the code with colors in Terminal, so i dont really feel like using it. Is there a way to make it better or should i get used to it?
4
u/Mission-Landscape-17 Jan 06 '26
Use a code editor. Python's default option is IDLE. But not that many people use it to be honest. A more popular one would be VS Code.
4
u/Almostasleeprightnow Jan 06 '26
You will get to a point where you want to edit your code in a file that you can save. At that time, pick an IDE and move there. IDLE is fine until it isn't.
3
u/rgcred Jan 06 '26
Second+ for VSCode which is a great utility and also a great learning tool. Google has a (very) similar offering called Antigravity which is worth a compare.
3
u/TheRNGuy Jan 06 '26
VS Code, terminal to install new frameworks, maybe for prints or error messages too.
4
u/Jaded_Show_3259 Jan 06 '26
I would suggest using an IDE with a built in terminal and interpreter. Write the code however you want. Can copy and paste from one to the other - set up projects etc.
I use PyCharm which is a bit heavier of an IDE than some others, but my coworkers had been using it for years so I just kinda fell into it.
PyCharm for example - allows you to specify which interpreter you use per project, and has tools to create virtual environments as well. In one click you can run, debug, open a terminal, etc. etc. Most IDE's have all those same features.
2
u/WendlersEditor Jan 06 '26
IP this is great advice, take it! I learned a lot on pycharm, it made it really easy to manage virtual environments and projects as a beginner.
2
u/corey_sheerer Jan 06 '26
Whether you run code from the terminal or from an IDE, both use the python interpreter. The Python interpreter reads and executes python code.
If you are asking where to write code, start in an IDE like VS Code. You can write some ad-hoc short code in the terminal if it is for an isolated task that you don't need to save the code... Unless you are asking whether to code in vim/ neovim/nano. Then you should probably still choose VS Code. But neovin is my top terminal text editor. Try it out
1
-1
u/kabads Jan 06 '26
Either - the result should be the same. Editors are for when you don't want to keep retyping stuff over and over again (and between reboots).
-1
u/Eleibier Jan 06 '26
Second for using thonny. It has a variable explorer, so you can check the value of a variable without printing everything. Alternatively you can use spyder.
3
u/StardockEngineer Jan 06 '26
You can use a code editor like VS Code. They highlight code and make it easier to run Python scripts.