(slightly OT): Python and linux - very cool

Mart van de Wege mvdwege.usenet at drebbelstraat20.dyndns.org
Thu Aug 8 06:14:36 CEST 2002


On Thu, 08 Aug 2002 01:45:11 +0200, Peter Hansen wrote:

> Mart van de Wege wrote:
<snip>
>> Note though, that Python does not rely on a complete VM yet, like Java
>> does.
> 
> For those of us who don't understand what "complete" means, relative to
> the Python VM which we thought was quite complete, could you please
> clarify this?
> 
Sorry if I'm mistaken, but I thought that the Java VM was a complete
virtual processor, whereas Python (just as Perl) merely generates a parse
tree on compiling the code.

If the Python VM is however a full Virtual Machine, then I apologise,
because it appears my knowledge is out of date.

>> There are however plans to port Python to the Parrot VM, so that it
>> will share a common VM with Perl. I am watching with interest, as I
>> really like the combination of Perl for the heavy lifting on the back
>> end, and Python for creating maintainable front-ends (Python *really*
>> shines in writing GUI code).
> 
> Sounds like a strange combination, unless you've really got a thing for
> Perl.  What "heavy lifting" can it do that Python can't do at least
> roughly as well?  (But no language war intended.  I just don't
> understand why somebody would want to mix the two, unless his dislike of
> each was about equal.  I thought both were roughly on par in general
> capability. :)

Actually, strange as it may sound, I like both Perl and Python. But Perl
really shines in text processing. Just running through a file and
extracting the bits you need with regular expressions is so easily done.

Constructs like the 'while (<FILEHANDLE>)' loop, which takes a  line from a
file  until EOF (meanwhile assigning it to the default variable) make it
really easy to toss of simple filter scripts.

For sure Python can do that too, but it takes a little more setup work,
and the clean (more or less <grin>) integration of regexps in looping
constructs such as above, makes me prefer Perl to do data extraction.

Mart

-- 
"Time expands and then contracts
When you're spinning in the grip of someone
Who is not an ordinary girl"
	Counting Crows - Hard Candy



More information about the Python-list mailing list