python metrics program/script sample

Philippe C. Martin philippecmartin at sbcglobal.net
Mon Dec 27 05:22:33 EST 2004


>>I don't know what "eric3/linux compatible" might be, I'm not sure
>>what this would be an alternative _to_, and I don't know what you
>>mean by "true" lines of code count, but the only thing I've
>>noticed lately that counts lines of Python code, and I'm fairly
>>sure it would run fine on Linux, is pycount.  Google for it...


Eric3 is a very nice Python IDE. 
By linux compatible I meant not *.exe.

"true" lines of code meant no blanks or comment - pycount calls those "normal 
source code":
>There are a couple of minor known bugs with pycount like: Doc strings must be 
>tripple-quoted ones otherwise they are classified as normal source code. 
>Continuation lines ending with a backslash are not treated at all. Complex 
>regular expressions (as in pycount itself) can knock the parser down, 
>quickly. There is a built-in quick-and-dirty solution to this which might 
>work whenever the problem is on one line only. But in "most cases" it 
>works...

I'll try pycount but the above bugs might mean a lot of rewriting.

Thanks,

Philippe





More information about the Python-list mailing list