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]( "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]( "PyWin32").  Want GUI for the script? Done! There’s [wxPython]( "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]( "Django") and [Turbogears]( "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]( "wxPython") and [PyQt ]( "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]( "IronPython")) and Java ([Jython]( "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]( "NumPy") and[ iPython]( "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]( "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]( "ReportLab")? Process [Audio/Video]( "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]( "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?"