Python version of IQ has been updates (IQ v0.34.python)

Alex Martelli aleaxit at yahoo.com
Mon Jun 18 04:59:32 EDT 2001


"Timothy Rue" <threeseas at earthlink.net> wrote in message
news:2509.568T2823T9766233threeseas at earthlink.net...
    ...
> Alex Martelli said a few things regarding the RE pattern matching between
> Python and Perl and some other comparisons.
>
> Is Perl syntax as easy to read as python, for the beginner?

For regular expressions, they're extremely similar, and both
VERY hard-going for a beginner.  Outside of regular expressions,
I do not think anybody would claim Perl's concise syntax is
anywhere near as easy-to-read as Python's clean and spare one.

> Can perl be compiled into byte code for faster startup or put into a stand
> alone application? Or is Perl strickly an interpreted language?

Both:-).  You can *buy* "Perl compilers" (e.g. from ActiveState
and IndigoPerl -- are there others?) that are roughly equivalent
to what you can do with the free py2exe and McMillan's "install"
for Python.  I doubt those support the Amiga (not sure, though).
py2exe is also Windows-only I think.  McMillan's stuff is rather
cross-platform but, again, I dunno 'bout Amiga support specifically.

> So I guess the question is whether or not such translators are available
> to perl?

Commercially, yes, but maybe not for the platform you desire.

> Of course you can port IQ to Perl if you want, but in any case (perl,
> python, rebol, arexx) it'd be nice to incorporate into IQ, the ability to
> access files thru the internet in a way that is as simple as accessing a
> file on the system you are using IQ on.

If you use Python, that's trivial -- just open the URL string with
urllib.urlopen, exactly like you would open a filepath string with
the builtin function open, and you'll get a file(-like) object ready
for reading through all the usual fileobject methods (.read, readline,
etc etc).  If the URL is actually a filepath, urllib.urlopen just
delegates the work to the built-in open, so you can also choose to
ALWAYS use urllib.urlopen (when you're opening for _reading_, of
course -- if you open for *writing*, it's different:-) and it just
works.  Not sure what the other scripting languages offer for this.


Alex






More information about the Python-list mailing list