By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,353 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,353 IT Pros & Developers. It's quick & easy.

python metrics program/script sample

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.