This month, Python won "Best Programming Language
" in the Linux Journal's Reader's Choice Awards 2011. If you're not convinced, Python Facts explains little simple things
that make Python great.
Python is relatively easy to learn
although if you wish you can learn it the hard way
If you already have experience in programming, basically all you need to know is that Python is essentially pseudocode as a programming language
. Of course, Python is way more than that. You can dive right into the documentation
and browse through the thousands of packages written in Python
Python is great for things like shell scripts
, text processing
, or data structures and algorithms
However, it's great for other things, too:
- Web Programming
- The most popular framework for web programming in Python is probably Django, but there's also Pylons, web2.py, web.py, Tornado, and many, many others.
- Game Programming
- Previously on MetaFilter but also check out the PyGame library. Python is also used as the scripting language for Blender3D and can be and has been used as the scripting language for many other game engines.
- There's actually an annual conference dedicated to using Python for science, but if you're not convinced, see its applications in biology/life science, earth science, chemistry[ PDF], physics, quantum physics, astronomy, and more. If your brand of science is very math-y, you'll probably also run into NumPy, a package for scientific computing.
Also, although Python is often run as a script from the command line, it can also be used to build GUI applications
Although Python ships with its own IDE
, there are many IDEs available for use with Python
. If you're already using Eclipse
for coding in other languages, you can add the excellent PyDev
Once you've started working in Python, if you're the social type you might want to check out one of the local user groups
also known as PIG
gies, or attend a Python Meetup
The initial developer of Python and its Benevolent Dictator for Life
is Guido van Rossum
). Insights on the current state and future development of Python can be gleaned from the list of PEPs
(Python Enhancement Proposals). The two most important PEPs are the Style Guide for Python Code
and The Zen of Python (available as an Easter Egg directly in Python, just enter import this into the command line)
And, in case you were wondering, the name was in fact based on Monty Python
and so instead of the traditional foo or bar
for metasyntactic variables
(or "placeholder names
"), you're often likely to see spam, eggs, and ham
used (PEP 8 listed above uses both foo and spam
as variable names).
Oh! Oh! And then there's the huge Python 2.x vs Python 3.0 thing. Basically, although it was not a complete rewrite from scratch (as per PEP 3099), it broke compatibility with Python 2.x, meaning many programs written for Python 2.x will not work if run in Python 3. Quite a few Python libraries still run in 2.x only, and so most people have a version of 2.6 or 2.7 running on their computers in addition to the 3.0 version (if they have a 3.0 version at all). Major changes include string formatting and the print statement becoming a print() function. String formatting and printing are used all the time in Python, so this is a big deal.