Skip to content

Instantly share code, notes, and snippets.

@philpennock
Created July 15, 2018 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philpennock/cd39215d868179e43ca07b7305ea65fc to your computer and use it in GitHub Desktop.
Save philpennock/cd39215d868179e43ca07b7305ea65fc to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import sys
import time
def foo():
print('ni')
time.sleep(0.1)
pass
def tracefunc(frame, event, arg, indent=[0]):
if event == 'line' and frame.f_lineno >= 9:
frame.f_lineno = 7
return tracefunc
sys.settrace(tracefunc)
foo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment