You can run Python in different ways according to your purpose.
Simplest way to run a python script is through IDLE or Python Shell.
But if you need to write couples of python code or wanted to write a long program, you need to do it in some other way. The possibilities are
1. Use any text editor- ( Notepad/Notepad++ in Windows)(VIM or Gedit in Linux)
2. Use IDEs (Eclipse, Spider, Pycharm)
3. Other Tools (IDLE, Ipython, Jupytor Notebook etc.)
4. Use Anaconda which contains all python packs
Lest see some Tools
IPython
IPython is a powerful interactive shell for Python programming language. It also support other languages. It has rich media, additional shell syntax etc.
The most important highlight of IPython is, you can make a browser-based notebook which works interactively and support for code, mathematical expressions, inline plots and interactive data visualization.
Also it is very easy to use and supports high performance tools for parallel computing.
To have a look at IPython on web see: https://www.pythonanywhere.com/try-ipython/
IPython Notebook
For installing and enabling the IPython notebook and its components lets install Anaconda
Anaconda
Anaconda is a free distribution of the Python for large-scale data processing, predictive analytics, and scientific computing and has lot many features.
Anaocnda for your python version can be downloaded from http://continuum.io/downloads
LINUX
Download the version according to your machine and install by the command
bash Anaconda-2.3.0-Linux-x86_64.sh
WINDOWS
Just install the Graphical version and select IPython notebook from the programs menu
Now lets start with IPython Notebook
A window will appear like the below.
Now select new and create a notebook from the menu (Notebook>>Python2)
Now you can enter your Python commands in the courser provided In[] Now hit shift + enter to execute your Python command
If you need to enter any documentation, in between change option to Heading with # in the beginning. Also, you can enter other text by using the option markdown.
The capability of the IPython notebook does not end here. You can make interactive graphs by using the corresponding module. See the example below
Code here
from IPython.html.widgets import interact def CircleArea(radius): Area=np.pi*math.pow(radius,2) print " Radius is : ", radius print " Area of your Circle is : ", Area
interact (CircleArea, radius=(0,10,0.1))