perl to python

Kirk Job-Sluder kirk at eyegor.jobsluder.net
Tue May 11 09:25:06 EDT 2004


On 2004-05-11, Duncan Booth <me at privacy.net> wrote:
> Kirk Job-Sluder <kirk at eyegor.jobsluder.net> wrote in
> Your code might have been a bit shorter if you had used the existing 
> facility in Python for editing files in place. The code below is completely 
> untested, so I can all but guarantee it doesn't work, but you get the idea:
>
> #!/usr/local/bin/python
> import getopt,sys,os,re
> import fileinput 

Thanks! Learn something new every day.  I would argue that length of
code is less an issue than the nasty exec statement.




More information about the Python-list mailing list