472,969 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,969 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 1671
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
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
3
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.