You are viewing an older version (9.14.0).Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython 9.14.0 / IPython / core / tbtools / count_lines_in_py_file

_lru_cache_wrapper

IPython.core.tbtools:count_lines_in_py_file

source: /dev/ipython/IPython/core/tbtools.py:24

Signature

def count_lines_in_py_file(filename: str) → int

Summary

Given a filename, returns the number of lines in the file if it ends with the extension ".py". Otherwise, returns 0.

Aliases

  • IPython.core.tbtools.count_lines_in_py_file