Module implementing a simple Python code metrics analyzer.
| COMMENT |
| DEDENT |
| EMPTY |
| INDENT |
| KEYWORD |
| NEWLINE |
| spacer |
| Parser | Class used to parse the source code of a Python file. |
| SourceStat | Class used to calculate and store the source code statistics. |
| Token | Class to store the token related infos. |
| analyze | Module function used analyze the source of a Python file. |
| main | Module main function used when called as a script. |
| summarize | Module function used to collect overall statistics. |
Class used to parse the source code of a Python file.
| None |
| None |
| __addToken | Private method used to add a token to our list of tokens. |
| parse | Public method used to parse the source code. |
| None |
Private method used to add a token to our list of tokens.
Public method used to parse the source code.
Class used to calculate and store the source code statistics.
| None |
| None |
| SourceStat | Constructor |
| dedent | Public method used to decrement the indentation level. |
| dump | Public method used to format and print the collected statistics. |
| getCounter | Public method used to get a specific counter value. |
| inc | Public method used to increment the value of a key. |
| indent | Public method used to increment the indentation level. |
| push | Public method used to store an identifier. |
| None |
Constructor
Public method used to decrement the indentation level.
Public method used to format and print the collected statistics.
Public method used to get a specific counter value.
Public method used to increment the value of a key.
Public method used to increment the indentation level.
Public method used to store an identifier.
Class to store the token related infos.
| None |
| None |
| Token | Constructor |
| None |
Constructor
Module function used analyze the source of a Python file.
Module main function used when called as a script.
Loop over all files given on the command line and collect the individual and overall source code statistics.
Module function used to collect overall statistics.