Python, the best general purpose language

A Network/SysAdmin friend of mine, asked me this question:

Which one programming language you would recommend a non-programmer to invest in?

My answer was instant: Python.

In my experience, Python beats any language in terms of general purpose usage. Consider the following:

  1. Python competes with Perl as a scripting toolkit. Scripting is a huge part of a sysadmin’s job. On Unix-like platforms Perl is the defacto standard, Python is a very close second – and in fact it is [considered more readable and maintainable](http://www.linuxjournal.com/article/3882 "Linux Journal"). It comes with a large variety of networking/internet libraries meaning you even have choices between SSH libraries, for instance! Then consider that you can port the script to a windows machine with minor changes, and roll it into an exe/msi for easy deployment. Perfect for in-house utilities. Need to mess with Windows internals? There are [Windows extensions for Python](http://sourceforge.net/projects/pywin32/ "PyWin32").  Want GUI for the script? Done! There’s [wxPython](http://www.wxpython.org/ "wxPython") or simpler GUI libs for a quick-n-easy cross-platform frontend for your scripts.
  2. Python competes with PHP/Ruby as a premier web development platform. [Django](http://www.djangoproject.com/ "Django") and [Turbogears](http://www.turbogears.com/ "TurboGears") are two major Rapid Web Development engines that are python based. Python frameworks abound from the really simple to full-featured. Finding python hosting is pretty easy and not-so-expensive.
  3. Python is used to build powerful desktop apps [wxPython](http://www.wxpython.org/ "wxPython") and [PyQt ](http://www.riverbankcomputing.co.uk/software/pyqt/intro "PyQt")are top-of-the-line GUI toolkits. Creating installers (EXE/MSI/RPG/DMG) is somewhat involved, but doable. Native look-and-feel (esp. wxPython) is really impressive. Don’t forget another huge key – Python can play with .NET ([IronPython](http://www.codeplex.com/IronPython "IronPython")) and Java ([Jython](http://www.jython.org/ "Jython")). Many simply use it as a glue language. In academic circles it is used extensively in scientific computing, statistical analysis and text-processing ([NumPy](http://numpy.scipy.org/ "NumPy") and[ iPython](http://ipython.scipy.org/moin/ "iPython") are favorites).
  4. Python’s usability Python is very high-level and dynamic (a plus for a non-programmer?)  and less verbose than Java and even C#. Some would say it’s like coding in pseudo code. It’s “open-kimono” object-oriented nature exposes internals in a way that a new learner can grasp easily. Another huge factor that weighs in, is [the abundance of free and cheap IDEs](http://wiki.python.org/moin/IntegratedDevelopmentEnvironments "Python IDEs") for all the above mentioned use cases (Komodo, Wing IDE, PyScripter, PyCharm). And don’t forget that it ships with an interactive shell (REPL) – with many alternatives (like Idle, iPython, PyShell for GUI) which is a killer feature for both new and mature users.
  5. The breadth of Python usage What can you do with Python…easily? Do you need to [generate PDFs](http://www.reportlab.org/ "ReportLab")? Process [Audio/Video](http://pymedia.org/ "PyMedia") files? There are literally 100s of mature libraries you can simply use from Python’s extensive, expert open-source community. Chances are, whatever you need to do, someone has done already – and has made their python code available for you to use, gratis. Don’t forget [documentation and books](http://wiki.python.org/moin/PythonBooks "Python books") – incredibly talented coders have written both general purpose and usage specific books relating to Python, and many are free. Pick one up and you are good to go! So yes, in my book Python is the best general purpose language for anyone, specially someone newer to programming, to invest in. What do you think?"