Skip to content

Instantly share code, notes, and snippets.

@philpennock

philpennock/loop.py

Created Jul 15, 2018
Embed
What would you like to do?
#!/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