zenlc2000 / pyp3

Pyed Piper tool by Toby Rosen at Sony Imageworks converted to Python 3
34 stars 13 forks source link

Edit files inplace like sed -i #14

Open bobpaul opened 7 years ago

bobpaul commented 7 years ago

Issue 23 from the original repository asks for sed -i like behavior. Something like

$ echo -e "123\n457" > file
$ sed -i 's/7/6/' file
$ cat  file
123
456

This seems like a good addition, but working with files are currently rather second class in pyp. I think this would take some re-thought. Maybe if pyp runs without any STDIN and the -t option, it treats the file input as pp instead of fpp.