Python comment stripper

Bjorn Pettersen BPettersen at NAREX.com
Wed Sep 18 13:20:34 EDT 2002


> From: Dennis Reinhardt [mailto:DennisR at dair.com] 
> 
> Does anyone have a Python source comment stripper or can 
> anyone recommend a parser that could be adapted for same?
> 
> Why?  ... well there is a better than 2:1 byte size reduction 
> in both raw and compressed .py files if comments are 
> stripped.  Results of analyzing dospath.py in :
> 
>                       raw Kb          compressed Kb
>                     ----------    --------------------
> original              10.44               2.98
> 4 spaces -> 1 space    8.85               2.86
> + strip comments       4.65               1.34

One question: How big is your disk page size?

-- bjorn




More information about the Python-list mailing list