Major changes in Python environment :
A lot has changed since I started posting about python programming back in 2013-2014. Those were the days when python 2.7 was a dominant python programming version. I used interactive mode of execution or use to type in a simple text editor in my Ubuntu 12 or 14.04.. Now, if we consider, python 3 is dominating the world. Python to is officially depreciated python became dominant programming language leaving almost all other programming languages. This blog started with a caption of "Digital Design through Python/VHDL/Verilog/MATLAB". But present focus will be on python 3 alone.
Coming to program execution, a wide variety of options are available these days.
- Interactive mode
- Code editors
- IDEs
Interactive mode :
In interactive mode, we execute code on a line by line basis. It is more suitable for learning the basics. To use this mode, we don't need to install anything separately in a Linux environment as python comes inbuilt with all Linux distributions these days.
Just open terminal and type python then hit enter. You are all set to execute python code in interactive mode.
Code Editors :
These are slightly advanced ways of writing python script compared to interactive mode. Here you can write the entire code at a time then hit run. There are many text editors which auto-suggest you about commands, systax and possible options with a certain operation. Indentation is auto adjusted and makes things easy for programmer.
Sublime text, Visual Studio Code, Atom etc., are some widely used code editors for python.
Another reason for people choosing code editors is that same editor can be used for multiple programming languages like C, C++, C#, HTML, java script etc.
Integrated Developer Environment (IDE):
An IDE clubs all the features that that a developer would want it to do. It can auto complete code, show documentation, provide version control, work on different frameworks and cross platform support is available. It is a wise choice for both beginners and developers. Beginners like it as it provides help in completing the code and developers like it due to the project end-to-end support.
PyCharm and Spyder are two dominant IDEs used widely these days.
Anaconda Environment :
Anaconda environment is a super integrated environment which has NumPy, Pandas, Matplotlib support, PyCharm, Spyder, Visual Studio Code integration and many more. It is highly recommended for data scientists.A special mention in this environment is Jupyter Notebook (my personal favourite) where one can visualize plots within the notebook along all other things an IDE can do.