Closed mirzawaqasahmed closed 4 years ago
There wasn't but quite easy to add, so added -r/--replace command-line option in 9ecfb29.
Update the module, and you should be able to do it via something like:
% python -m pyaml -r file-with-json.data
It does that via temporary file, but without fsync/fdatasync, which I think should be reasonably safe and not too demanding for such simple use-case.
Hope it helps, cheers!
Thanks will try and get back if something else comes up..
Hi, Great project.... Just wanted to check if there is a way to input a file, prettify it and then write back to the same file?
Thanks