Moving from Perl to Python

Jeff jam at quark.emich.edu
Sat Sep 25 12:45:18 EDT 1999


On Fri, Sep 24, 1999 at 04:06:49PM +0200, Thomas Weholt wrote:
> Hi,
> 
> I got some experience in Perl, but want to move over to Python for
> several reasons. One is discussed in an earlier thread, another is the
> fact that I`m having a hard time understanding effective perl-scripts
> due to the syntax. Python seem better, ie. easier to read.
> 

I would agree.

> I got almost every book available on Perl published by O`reilly and one
> of them, The Perl Cookbook, stands out as the most helpful. I was
> wondering if there  were any other book or document online available for
> Python? It has the structure of a simple question or desription of a
> common task and code examples + explanation on how to solve it. 
> 

there is a *lot* of sample code and documentation available for python.
start with the standard library (on my linux machine, it's
/usr/lib/python1.5. this directory has *tons* of modules that you can look
at and figure out what they do. there's an FAQ, and a few projects on the
python.org website that are 'sort of' question and answer. the FAQ module
comes to mind. it's not a huge archive yet though. poke around on
<http://www.python.org/> and see what you can find.

> Another thing that could help was if there was a document describing how
> to migrate from Perl to Python, with examples. 
> 

I am not aware of any such thing, but I'll be happy to contribute to such a
project.

> PS ! I`m using hashes and modules in Perl, like MLDBM and MP3Info, are
> there any similar modules for Python? I know Python can read hash-tables
> created with the DB_File-module, but can it read/write files created
> with the MLDBM-module?
> 

what does the MLDBM module do? in general, when trying to approach these
types of problems (for example, in the linux kernel) it's best to try to
find 'read only' access to a new type of file, and *then* worry about being
able to write them out. I suspect MP3Info is something you'll need to
convert over to python.. it would make a great module.

> If this mail is incomprehensible etc. I`m sorry. I was in a hurry.
> Thanks anyway.
> 
> 
> Thomas Weholt,
> Norway
> 

regards,
J
-- 
|| visit gfd <http://quark.newimage.com/> 
|| psa member #293 <http://www.python.org/> 
|| New Image Systems & Services, Inc. <http://www.newimage.com/>




More information about the Python-list mailing list