The fact that Python has "a wealth of libraries" isn't particularly pertinent--web apps mostly need web-specific libraries, which Python doesn't have (because it isn't in the browser). Most people using JavaScript get by with jQuery, maybe some web ui framework and perhaps something like Raphael. And, with the advent of node and server-side JavaScript, JavaScript is getting more and more libraries outside of the browser as well.
Of course, the browsers could support a bunch of different languages, but I think the complexity outweighs the (limited) benefits. Google, obviously, disagrees and thinks that Dart should also be an option, but I really think it isn't worth the effort.
Ultimately, JavaScript is more than good enough as a browser language; while it does have some annoying quirks, upcoming versions (and things like "use strict") are getting rid of most of them. There really is no overwhelming reason to switch away from JavaScript, and even just adding another language is probably not worth it.
I'm not claiming that python wouldn't need a new standard library to manipulate a browser's dom tree or whatever. That's about all it would need though, so it seems like it would have been far less work to embrace and extend than to completely start over.
You seem to be arguing from the perspective (and please correct me if I'm wrong) that javascript is a good solution and a fine programming language, and I am not claiming otherwise. I just don't understand why so much effort has been spent creating and polishing Javascript instead of making slight improvements to a previously established quality language.
I suspect the answer is that your browser has an advantage if your javascript engine is faster, but there can be no advantage if everyone uses the standard python interpreter.
Also, unless I'm unaware of something, wasn't Perl the most popular scripting language back then? So if they had included an already existing language, Perl would probably have been the best bet.
Embedding Perl was (and is) painful. Tcl would have been easier.
Sandboxing would have been more difficult. Auditing all of Perl 5's operations for the possibility of escaping that sandbox is a huge task.
Since native environments often give the developer a greater degree of language-choice freedom as well as greater degree of access to complex APIs, I fail to see how offering the same freedoms in the comparatively miniscule browser API would cause the complexity to outweigh the benefits.
If browser makers just standardized on a language-neutral runtime like the JVM or the CLR then no central committee would have to be responsible for maintaining support for specific languages.
1. Python is not sandboxed. Security is necessary in a web browser. 2. Python has some JIT work, mainly PyPy, but even so is much slower than JavaScript. 3. You can compile Python into JavaScript (see demo at repl.it), where it will be sandboxed.
Similar reasons apply to other proposed languages, for a web language we need security, speed, standardization, and portability (and often we can already compile them into JS, so the motivation is lessened anyhow). I am unaware of any option that has all of those to the extent that JavaScript does.
Does it mean lambdas or other anonymous functions? Python lets you close over names at any scope and define functions anywhere; you don't need the "lambda" keyword. Even if you want to only use lambdas, it's been shown that Python does not need statements, only expressions, to express everything, although you quickly turn your code into Scheme-soup. JS doesn't somehow improve on this.
Is it first-class functions? Python has those, just like JavaScript, although Python goes further, enabling you to have real bound methods, descriptors, properties, class methods, and all other kinds of fun.
Is it map, filter, and fold? Python's still got map, filter, and fold (foldl, called "reduce" in Python.) Python also has list comprehensions, borrowed from Haskell, as well as generator expressions, providing that valuable laziness that some functional languages value so much. And, in Python 3, there are set and dictionary comprehensions as well. JavaScript doesn't have comprehensions at all.
Is it referential transparency or immutability? Unlike JavaScript, Python refuses to allow you to edit the values of certain builtin types, like str and unicode.
So, uh, what did you mean, exactly?
Even if you were right, you could still make code that doesn't use these features fast, and slow back to interpreted if any of these features is used -- that's what JS JITs do when they see "with".
And finally, Lua is as dynamic as Python (both of which are, in my opinion, less dynamic than JS thanks to lexical binding). And Lua has been made significantly faster than any Python or JS implementation (Mike Pall's LuaJIT2)
Why don't browsers support a sand-boxed python (or insert favorite language x) with some sort of standard dependency management? It already has JIT compilation, is cross-platform, bytecode, a wealth of libraries, etc. Why are we reinventing this wheel?