Downloading Python IDE from official website
In order to be able to learn and run Python programs at your computer, you need to download and install a stable version of Python and configure it (if required). The current stable versions are Python 2.7.6 and Python 3.3.3.
For learning purpose, we recommend downloading and install the latest version. However, if you need to learn and then work at a previously developed project then maybe you need a previous version.
The downloadable versions are available at the following link: http://www.python.org/download/
Install IDE at Windows computer
Follow these steps to install Python IDE:
- Download appropriate version from the link given above for Windows. The windows installer is Pythonxx.msi.
- After downloading, double click on the .msi file and run the setup.
- Just follow the steps to configure IDE.
Run Python code on Shell window
Lets us say, If you are using the Windows 7 and installed Python 3.3.2 then go to Start –> All Programs –> Python 3.3 and open IDLE(Python 3.3 IDE).
After shell window is opened (IDLE or IDE) write these statements:
print (“hello World”)
That should output as:
Here you go, Python is installed.
Please note, the print has become a function in Python 3.3. Before that, it was taken as a statement. So this will generate an error:
Print “hello world”
There you may write any commands, statements, loops etc using the Python syntax.
Similarly, you can use menu File – New Window in the shell window: This will open a new window where you can write full code of Python. Save it to the desired location and give it a name. To parse / run the code press F5 or go through the menu.
Install IDE on MAC OS
In MAC OS, Python is bundled, i.e. Mac OS already has it. However, this is quite probable that the version is quite old. In order to use the latest version, go to the download page of the official website: http://www.python.org/download/. Download the appropriate version for MAC and install it into your system.
How to start IDLE (Python IDE) on MAC
In a terminal window, type python. The Python shell should be started.
In prompt (>>>) of shell window type: import idlelib.idle
This should start the IDLE i.e Python’s IDE.
What’s next? Write Python hello world program