467,877 Members | 1,141 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

python metrics program/script sample

Hi,

I am looking for an eric3/linux compatible alternative to checking code
metrics (ex: true lines of code count)
Regards,
Philippe

Jul 18 '05 #1
  • viewed: 1546
Share:
2 Replies
Philippe C. Martin wrote:
I am looking for an eric3/linux compatible alternative to checking code
metrics (ex: true lines of code count)


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...

-Peter
Jul 18 '05 #2
On Mon, 27 Dec 2004 12:09:16 -0500, Peter Hansen <pe***@engcorp.com> wrote:
Philippe C. Martin wrote:
I am looking for an eric3/linux compatible alternative to checking code
metrics (ex: true lines of code count)


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...

-Peter

You can also use pylint (logilab.org) which print something like :
Report
======
57 statements analysed.

[snip]

Raw metrics
-----------

type number % previous difference
:::::::::::::::::::::::::::::::::::::::::::
code 61 64.21 61 =
docstring 22 23.16 22 =
comment 3 3.16 3 =
empty 9 9.47 9 =
As it is pure python it should not be difficult to adapt to your needs.
(but do not feed pylint with a module with tabs, the final 'Global
evaluation' will be deceitfull)

Sorry for bad english, I'm not a native speaker.
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Allison Bailey | last post: by
2 posts views Thread by satish | last post: by
699 posts views Thread by mike420 | last post: by
6 posts views Thread by planetthoughtful | last post: by
2 posts views Thread by mirandacascade | last post: by
1 post views Thread by alibaaba | last post: by
reply views Thread by bruce | last post: by
reply views Thread by Goldfish | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.