Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python trace code execution

import sys
import trace

# create a Trace object, telling it what to ignore, and whether to
# do tracing or line-counting or both.
tracer = trace.Trace(
    ignoredirs=[sys.prefix, sys.exec_prefix],
    trace=0,
    count=1)

# run the new command using the given tracer
tracer.run('main()')

# make a report, placing output in the current directory
r = tracer.results()
r.write_results(show_missing=True, coverdir=".")
Comment

PREVIOUS NEXT
Code Example
Python :: how does a neural network work 
Python :: slice python 
Python :: object function in python 
Python :: pandas and operator 
Python :: iterate rows and columns dataframe 
Python :: confusion matrix code 
Python :: NumPy fliplr Syntax 
Python :: django count all objects 
Python :: unable to import flask pylint 
Python :: using polymorphism in python 
Python :: format binary string python 
Python :: how to print an index in python 
Python :: django migrate 
Python :: how to sort subset of rows in pandas df 
Python :: Flatten List in Python With Itertools 
Python :: BST_Deleting 
Python :: django insert data into database foreign key view.py 
Python :: how to use with statementin python 2.4 
Python :: inline if statement python return 
Python :: how to scan directory recursively python 
Python :: most occurring element in array python 
Python :: how to access a txt file through os library in python 
Python :: code pandas from url 
Python :: list vs dictionary python 
Python :: django http response 204 
Python :: looping through strings 
Python :: start ipython with any version 
Python :: how to extract column from numpy array 
Python :: threadpool python map 
Python :: import statsmodels as sm 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =