What is Python ?
Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code.
At least, thats what the official site says. I think its all that. But in a nutshell its a cool and simple way of getting your work done.
As is ancient tradition with programming languages, the best way to start would be with a simple hello world.
( For those already knowledgeable in that subtle and most gratifying art of python programming, kindly bear with those of us who came in late..
)
Your first step should be to get python on your computer.
Python is invariably a part of any Linux distribution. But if you are a Windows user or if you end up without Python on your Linux distro, you can get python here.
Open your Python Interpreter
Then type in : print “Hello World”, at the command line,
That should do the trick !.
Some times I think Python was invented in those trouble-free times when man delved in the simple and chivalrous knight roamed the earth. Such is the might and splendor and straightness of it.
Note: try using an editor that supports syntax highlighting for Python. That helps with the coding. I personally use kwrite or gedit, but vim or IDLE is also recommended.
Now lets put aside the command prompt for a while and try opening a source file.
All python source files have the extensions *.py. Open a file hello_world.py. Type in print “Hello World” as above. Save the file and then run it using :
# python hello_world.py
You should see identical results in both the cases.
Now if you ask me if this blog simply a Python tutorial I’d have to say ” not exactly “. The purpose of this Weblog is to preach Python. So I might put in tutorial posts like this, but mostly you should be seeing something a bit more complex more often. I just put this post in as an ice breaker. But I might continue on this thread for some time.
P.S. I would recommend a reading of this excellent tutorial by Swaroop C H: The Byte of Python