What do you guys think about this - file writing

Fernando Pérez fperez528 at yahoo.com
Sat Aug 31 03:30:16 CEST 2002


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.



More information about the Python-list mailing list