Created
July 15, 2018 07:07
-
-
Save philpennock/cd39215d868179e43ca07b7305ea65fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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