First of all I will say that I love python. Its Amazing in my eyes for what it is. I love programming in it, its actually fun. Lots of other people also love python and it has a large online development and user community. But it seems companies don't use it or are very reluctant to do so. When scanning classifieds I find 1 python job for ever 50 Java jobs. Why is this? What makes Java so much more employable than Python? I just don't see it, development in python is faster, more enjoyable to work with and much easier to read.
Lots of sweeping generalisations there.
I would say that python supplements many languages really well. Employers should certainly see it as a bonus, but knowledge of a C/Java-like strongly-typed language is usually required in most cases for core development.
There are reasons on many levels. Here's a pretty unsorted list of stuff that plays into the situation. Note that not all of this represents my personal opinion.
- Java is (an) industry standard. Python isn't.
- There are many Java developers but few Pythonians.
- When learning a programming-language many people choose one of the market leaders, i.e. Java over Python.
- Java is taught in schools and at universities. Python isn't.
- Java has a marketing department with a budget that actually makes a difference. Python hasn't.
- HR departments seldom care about employee happiness.
- Java is strongly typed, reducing the number of stupid errors one can make.
- Java is compiled and therefore faster than a script language.
- Java has a much better supported application-server story.
- Java has conferences.
- Java has many course offerings from various sources.
Python has no killer-application, unlike Ruby which has Ruby on Rails. There is therefore no reason for organisations to adopt Python and introduce yet another programming language into the mix. If it were not for Ruby on Rails, Ruby would be a marginal language just like Python.
"Make a better mouse-trap and the world will beat a path to your door" has always been a fallacy.
Several reasons:
Java is commercial, Python is free software community driven
For some reason many companies still are afraid of free software, even when there are very mature products available, a very mature community around the product and even commercial support outfits.
Java has a strong corporate legacy, Python is a relatively new kid on the block
In many corporate environments Java has been used for years, there is established experience, existing Java based products etc. Switching to a different language as a corporation is a risk, it may turn out positive, it may turn out negative, it all depends on the language, the people working for you, the kind of products you develop, etc.
Python is not suited to everything
Just as any language is not suited to everything, Python is not suited to everything. Python won't do you much good in realtime or embedded environments for example. This holds for any language, Python is no exception.
Not everyone likes Python
Python has its idiocyncrasies, just as any language, some people like them, some people don't. Python scoping for example is still something many people have beef with. But also Python has its flaws and still some growing pains as it is maturing. The libraries are still missing a lot of orthogonality, etc.
People know Java, not many people know Python
This is tied to reason 2, due to the large established base of Java in the corporate community this is what people know, this is what people are tought, it takes time an effort for something like that to change.
Python is scary
Dynamic typing and interpreted languages scare people, both for invalid and for valid reasons. For dynamic typing for example, invalid reasons are just the general uncomfortable feelings people get and their idea that static typing is inherently better or more secure. Valid reasons would be that they know their developers would not apply the proper development techniques for using dynamic typing, for whichever reasons, valid or not. For example not using proper test driven development, trying to write Python like it's Java, etc. Python is a seriously different language and you need an equally serious change in perspective to make it work.
Here is a few reasons. I'm sure there are more.
- Java is available on way more platforms (you can program cell phones, gps systems, etc.)
- You can find much more information about Java on WEB.
- Java have some GUI classes out of the box while the last time I checked Python is using some additional libraries like Tkinter.
- As much as I don't want to say this Java is probably a few times faster then Python.
- People don't want to learn new syntax. Java is quite C/C++ style while Python scares a lot of people with the code indenting (which if you ask me is the best thing in Python).
Yes python is great in my eyes too!
# swap
a, b = b, a