En Tue, 27 Oct 2009 05:50:47 -0300, Lutz Horn <lutz.h...@fastmail.fm> escribió:
* holmes86 [Tue, 27 Oct 2009 00:55:36 -0700]:

Is there function of modify row content in python? just like 'sed' in
shell,thanks

Sed doesn't actually modify the contents of a file. In normal operation
mode it reads from STDIN and writes to STDOUT. Some versions of sed
provide the -i option to

  edit files in place (makes backup if extension supplied)

You could program a similar behaviour in Python using the re module.

There is the fileinput module:
http://docs.python.org/library/fileinput.html

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to