pycount 0.6.18

Last updated:

0 purchases

pycount 0.6.18 Image
pycount 0.6.18 Images
Add to Cart

Description:

pycount 0.6.18

pycount=======* experimental LOC tool (lines of code, a.k.a. SLOC)* doing this to learn Python* feel free to raise issues if you find something unusual (the likelihood of someone even looking at this isvery close to zero, so I'm not expecting anything :D)**TODO*** add recognition of text files without extension* add a lightweight option for results charting* add rules to separate comments based on type of file* count code lines, comments and blank lines separately* improve speed, always* write tests**INSTALL**```pip install pycount```**USAGE**You can run the command at any location in your command line```<your code dir>pycount‘‘‘Oryoucanpassitpatharguments‘‘‘ pycount ~/My/Repos/Some/Project # single pathYou can't use 'macro parameter character #' in math modeYou can't use 'macro parameter character #' in math mode pycount ~/some.file.py # just one file```Exclude directories or files (exact match)```pycount−etest,external pycount -e test,test.c someproject # counts only 'someproject' directory, while excluding 'test' directory and 'test.c' file```Alternatively, you can use the Counter class```from pycount.core import CounterCOUNTER = Counter() # or Counter('some/path') # or you can pass it a list of pathsCOUNTER.discover() # discovers all unique files for a pathCOUNTER.count() # counts all lines of code, using the pre-defined file types which should be considered```to see just the files, file type count and final results, you can use the class attributes```COUNTER.discover()COUNTER.files # lists all the filesCOUNTER.count()COUNTER.file_types # outputs the breakdown of counted file number, by file typeCOUNTER.results # outputs the dictionary with all the values that were collected through counting per file type```

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.