Combining python and perl

Albert Hopkins marduk at letterboxes.org
Sun Aug 23 09:00:00 EDT 2009


On Sun, 2009-08-23 at 05:37 -0700, Peng Yu wrote:
> Hi,
> 
> According to http://www.python.org/doc/essays/comparisons.html, it
> says
> 
> "Python and Perl come from a similar background (Unix scripting, which
> both have long outgrown), and sport many similar features, but have a
> different philosophy. Perl emphasizes support for common application-
> oriented tasks, e.g. by having built-in regular expressions, file
> scanning and report generating features. Python emphasizes support for
> common programming methodologies such as data structure design and
> object-oriented programming, and encourages programmers to write
> readable (and thus maintainable) code by providing an elegant but not
> overly cryptic notation. As a consequence, Python comes close to Perl
> but rarely beats it in its original application domain; however Python
> has an applicability well beyond Perl's niche."
> 
> My question is that how to combine both python and perl to take
> advantages of both their strong aspects. Of course, I want to
> primarily use python---that is why I send this message to this group.

I'm not sure why you'd want to "combine" them.  You can pretty much do
the same things with both language, it's just that one may emphasize one
thing or make it easier for the user than the other.  For example,
regular expressions in Perl.  It's built into the language, but that
doesn't mean Python doesn't have regular expressions, just that Python
is less "centered" around them.  If you want to use regular expressions
with Python just "import re".

-a





More information about the Python-list mailing list