Skip to main content

Counts lines of Python code

Project description

lopc (Lines of Python Code)

usage: lopc [-h] [-e EXCLUDE_DIR] [--no-defaults] [-v] TARGET [TARGET ...]

Count lines of Python code

positional arguments:
  TARGET                File or directory to scan (can be given multiple times)

optional arguments:
  -h, --help            show this help message and exit
  -e EXCLUDE_DIR, --exclude-dir EXCLUDE_DIR
                        Add directory (and its subdirectories) to the
                        exclusion list. Can be given multiple times. Unix
                        shell-style wildcards (?*) are allowed. Default =
                        'venv', '.*' and '__pycache__'
  --no-defaults         Don't exclude any directories by default (use
                        --exclude-dir as needed)
  -v, --verbose         More output (can be given multiple times, default =
                        not verbose)

Install

(venv) $ pip install lopc

Run

(venv) $ lopc /home/markku/devel/lopc
/home/markku/devel/lopc Files: 4 Lines: 142

(venv) $ lopc /home/markku/devel/lopc -v
File: /home/markku/devel/lopc/setup.py (16 lines)
File: /home/markku/devel/lopc/lopc/__init__.py (0 lines)
File: /home/markku/devel/lopc/lopc/__main__.py (5 lines)
File: /home/markku/devel/lopc/lopc/lopc.py (121 lines)
/home/markku/devel/lopc Files: 4 Lines: 142

(venv) $ lopc /home/markku/devel/lopc -vv
Directory: /home/markku/devel/lopc
File: /home/markku/devel/lopc/setup.py (16 lines)
Directory: /home/markku/devel/lopc/lopc
File: /home/markku/devel/lopc/lopc/__init__.py (0 lines)
File: /home/markku/devel/lopc/lopc/__main__.py (5 lines)
File: /home/markku/devel/lopc/lopc/lopc.py (121 lines)
Directory: /home/markku/devel/lopc/lopc.egg-info
/home/markku/devel/lopc Files: 4 Lines: 142

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lopc-1.0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

lopc-1.0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file lopc-1.0.2.tar.gz.

File metadata

  • Download URL: lopc-1.0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.3

File hashes

Hashes for lopc-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c7482b95349cbf40804eaf244e39c915dab3437516f7a126ce1da2594096bfff
MD5 4fcae4b7210700ff3763b7fb5bc4c12f
BLAKE2b-256 dfd2128e74c15649dc4f09099edc11ea3e8bc81733bccc85788b42521e240325

See more details on using hashes here.

File details

Details for the file lopc-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: lopc-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.3

File hashes

Hashes for lopc-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 92d2118e816ca23634023ce0287e8db64b3a0db06a428b248f84b5359cc7858d
MD5 a2403f70e6803a2716eb1adea7c55309
BLAKE2b-256 7d3f8beabe83c99a7e1de1f850c044ac9e60e93ab5ed4d65b740ede728d984f2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page