Install Python and Say Hello World.
Python is an open source programming language and available free to use. Python's latest version is Python 3.0. But for I recommend to start with Python 2.6 as many of the 3rd party libraries are still compatible with Python 2.6
Python can be freely downloaded from http://python.org/download/ site. Click on the "Python 2.6.2 Windows installer", if you are using Windows OS. Select other options if you are using a different operating systems. Download the installer and just follow the simple wizard to install.
Say Hello World!!!
As we are always telling, if Python can be learned in few days and increases productivity of developers, the basic program also should be simple, right?
Yes. it is simple and one liner. Follow the below steps to write your first program of Python.
1. Open Program files --> Python 2.6 --> Python IDLE (Python GUI).
2. You will see a prompt like ">>>"
3. type print "Hello World!!!" and press enter.
4. You see the output, "Hello World!!!".
How can you write as a program?
1. Open Notepad or any text editor
2. add the following line to the text file
print "Hello World!!!"
3. Save the file as C:\hello.py (Python files are generally saved with .py extension)
4. Open Command Prompt using Start --> Run --> Cmd
5. Change directory to Python folder (in my case c:\python30)
6. Now type the following command at the command prompt
Python C:\hello.py
That's it you will the "Hello World!!!" output as shown in the above image. :)
We will see how python reads the hello.py file, compiles, etc., in the coming posts.