Trying to choose between python and java

Matimus mccredie at gmail.com
Wed May 16 11:14:45 EDT 2007


> I tend to use the shebang #!/usr/bin/env python in my scripts so far
> but I imagine that having that would not work on say windows. Or is
> there some kind of file extension association for people running
> windows instead of the shebang?

The shebang is ignored in Windows (as far as I know). There is
are .py, .pyc, .pyo and .pyw associations added to the registry when
you install Python on a Windows machine. They can be executed like any
other program.

> I saw on the python site a slide from 1999 that said that python was
> slower then java but faster to develop with is python still slower
> then java?

I don't have any numbers, but yes it probably is a bit slower for some
tasks. Especially for hardcore number crunching. Of course, you can
always rewrite the slow bits in C and get a speedup. Also, there are
optimizers that are supposed to work pretty well. In the end though,
Python is fast enough for most tasks. For very heavy computation I
wouldn't use Java either. The interpreter does seem to start much
quicker than the JVM.

Also, I'm sure it has been mentioned, but you might checkout Jython,
which is essentially python written in Java.

Matt




More information about the Python-list mailing list