Show HN: Pythonpy – the swiss army knife of the command line
I like it! Now I can count the number of files I have in a directory:<p><pre><code>    ls |py -l 'sum(1 for x in l)'</code></pre>
And also I can count the number of files whose names matche a certain extension:<p><pre><code>    ls |grep .py |py -l 'sum(1 for x in l)'
</code></pre>
I am not saying it was not possible before, but I don't know how to do it in bash.<p>Looking forward to use that for some basic stats on file. The following should sum up the first column of a csv.<p><pre><code>    cat data.csv| py -x 'x[0]' |py -l 'sum(x for x in l)'</code></pre>