r/PythonLearning • u/AJS_123 • Oct 15 '24
Where to make python scripts?
I have just started learning Python and have a background in using MATLAB. When using MATLAB there are buttons at the top where you can make a new script separate to the command window where everything can be edited and run all at once. Is there some type of software I need to achieve a similar thing with Python? Thank you for your help!
2
u/feitao Oct 15 '24
Use a code editor such as VS code, vim, emacs, notepad++ to write the source code. Run the Python script in a terminal.
1
u/NatesAquatics Oct 15 '24
This or doesnt Python come with a code editor?
1
u/Sensitive_Bird_8426 Oct 15 '24
IDE does work. VS Code (or the open source VS Codium) has more powerful tools that help a bit more.
2
2
u/Darkstar_111 Oct 15 '24
A python script is just a file that ends with .py
A python module is a folder with a file inside named __init__.py, this file can be empty.
You can run any python file from the command line or terminal by typing python myfile.py
Making sure you're in the right folder first. And in some cases like with mac it's python3.
2
u/Novero95 Oct 15 '24
VSCode with the Python extension is what most people use, probably. There are also IDEs like Spyder, which is oriented to scientific computing, similar to Matlab but running python. Nothing that you couldn't have discovered yourself doing a google search.