Quick application debugging and analysis for Python
Latest commit b643200 Apr 21, 2016 @kennethreitz Merge pull request #4 from rajat404/master
added python3 compatibility
Failed to load latest commit information.
showme added python3 compatibility Apr 21, 2016
.gitignore Updated .gitignore for MANIFEST. Sep 5, 2010
AUTHORS Merge branch 'release/1.0.0' Sep 5, 2010
HISTORY.rst Merge branch 'release/1.0.0' Sep 5, 2010
LISENCE MIT Jul 17, 2010
MANIFEST.in Merge branch 'release/1.0.0' Sep 5, 2010
NOTICE Merge branch 'release/1.0.0' Sep 5, 2010
README.rst Fixed a typo in README.rst Sep 29, 2011
ROADMAP.rst Merge branch 'release/1.0.0' Sep 5, 2010
reqs.txt Fixed requirements file for virtualenvs. Sep 6, 2010
setup.py setup.py publication. Sep 5, 2010


ShowMe -- Quick and easy debugging for Python

ShowMe is a simple set of extremely useful function decorators for Python. It allows you to view trace information, execution time, cputime, and function documentation.


To use showme, simply:

pip install showme

or, if you must:

easy_install showme


Print passed-in arguments and function calls.

def complex_function(a, b, c, **kwargs):

>>> complex_function('alpha', 'beta', False, debug=True)
calling haystack.submodule.complex_function with
   args: ({'a': 'alpha', 'b': 'beta', 'c': False},)
   kwargs: {'debug': True}

Print function execution time.

def some_function(a):

>>> some_function()
Execution speed of __main__.some_function:
0.000688076019287 seconds

Print function cpu-execution time.

 def complex_function(a, b, c):

 >>> complex_function()
 CPU time for __main__.complex_function:
      3 function calls in 0.013 CPU seconds

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     1    0.013    0.013    0.013    0.013 test_time.py:6(test)
     1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
     1    0.000    0.000    0.000    0.000 {range}

Pretty print function documentation.

def complex_function():
    """Example Documentation for complex_function."""

>>> complex_function()
Documentation for __main__.complex_function:
Example Documentation for complex_function.