What do you guys think about this - file writing

Micah Mayo astrophels at yahoo.com
Sat Aug 31 03:36:21 CEST 2002

Fernando Pérez wrote:
> Micah Mayo wrote:
>>This works - but I was hopeing there was a more elegant way to do this.
>>If anyone can think of a more efficient way to do this(not having to
>>open two files would be nice), I'd appreciate the input.
> # sed 's/old/new/g' old.file > new.file
> As much as I love python, there's something to be said sometimes for the good 
> ole' unix toolset.
> Cheers,
> f.
That probably isn't what I'm looking for for a couple of reasons - for 
one I'd like to avoid "shelling out", and because of the the loop I'm 
going to run to update and move my files, I'm storeing the actualy 
change in an array. But I do appreciate your input.


More information about the Python-list mailing list