[Toybox] request for comments: pybloat.py

Elie De Brauwer eliedebrauwer at gmail.com
Wed Feb 15 14:22:28 PST 2012


On 02/15/2012 01:54 PM, Rob Landley wrote:
> On 02/15/2012 06:37 AM, Elie De Brauwer wrote:
>> Jikes, apparently there is no installation candidate for python2.7, I'll
>> modify the code to use optarg instead of argparse, python2.7 isn't as
>> widespread as i thought it was. I'll get a new version for testing out.
>>
>> (I considered writing it in sh or C, but the fact that python natively
>> supports set operations was the reason to keep in in .py).
>
> Python is a very nice language. (Although these days with the version
> skew python is about three very nice languages sharing the same name...)
>
> That said, shell is marvelously abuseable:
>
> diff<(nm --size-sort toybox_unstripped | sort -k3,3) \
>       <(nm --size-sort toybox_old | sort -k 3,3) \
>       | grep "^[<>]" | sort -k4,4
>
> (Ok,<(blah) is a bash extension...)
>

Well, I promised a version which just uses getopt, and this one I tested 
with python 2.6, so see attach. Next point is whether to send it 
completely to /dev/null, or to modify it if needed to fit our needs (as 
said comments welcome).


gr
E.

-- 
Elie De Brauwer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pybloat.py
Type: text/x-python
Size: 4860 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20120215/d88d9c38/attachment-0002.py>


More information about the Toybox mailing list