Does python have an equivalent to Perl's inplace-edit variable $^I? For example, the following perl code below changes mike to dave in a file that is passed as an argument.
#!/usr/bin/env perl #chgit script $^I = ''; while(<>) { s/mike/dave/g; print; } The script would be used as below: chgit somefile Afterward, all instances of mike are changed to dave. Thanks. Mike -- | _ | * | _ | | _ | _ | * | | * | * | * |
-- http://mail.python.org/mailman/listinfo/python-list