473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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
2 1680
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
2
by: satish | last post by:
Hello all, I have a shared object executable viz. *cable* which I execute as follows : $ ansyscust71 -custom cable -p ANSYSRF **ansyscust71 is a shell script and is a part of a software...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
6
by: planetthoughtful | last post by:
Hi All, I've written my first piece of practical Python code (included below), and would appreciate some comments. My situation was that I had a directory with a number of subdirectories that...
2
by: mirandacascade | last post by:
Situation is this: 1) must write application that does the following: a) creates an xml document, the contents of which, is a request transaction b) send xml document to destination; I am...
1
by: alibaaba | last post by:
HI All, i am a 4th year business student and i took web design online course for fun however i did not see that last 2 chapters were python programming.This has no relevance to my major nor does...
2
by: neeebs | last post by:
Hi, I'm not sure if this is a javascript problem per se, but here goes. I have an xsl document with a python function defined within a <script> block. Elsewhere in the xsl file, within a python...
0
by: bruce | last post by:
hey guys... i managed to solve what i was attempting.. my goal was rather simple, to be able to have a python script, call a ruby app, and be able to return a value from the ruby (child) app to...
0
by: Goldfish | last post by:
Spring Python 0.6.0, the python offshoot of the Spring framework and Spring Security, has been released (http:// springpython.webfactional.com). See...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.