⬅︎ Back to Find print statements in Python code
Nice.I usually dig deeper into the toolbox for crap like this:find . -name '*.py' | xargs egrep '^[ \t]*print'Or, remove all print statements automatically.. sort of..for f in $(find . -name '*.py') ; do egrep -v '^[ \t]print ' $f > $f.new mv $f.new $fdone
Comment
Nice.
I usually dig deeper into the toolbox for crap like this:
find . -name '*.py' | xargs egrep '^[ \t]*print'
Or, remove all print statements automatically.. sort of..
for f in $(find . -name '*.py') ;
do
egrep -v '^[ \t]print ' $f > $f.new
mv $f.new $f
done