Created
November 6, 2015 12:54
-
-
Save miccoli/3df5e84624b50cb070de 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
import itertools | |
from pyownet import protocol | |
p = protocol.proxy('localhost', persistent=False) | |
freq = 1 << 12 | |
for i in itertools.count(): | |
try: | |
c = p.dir() | |
except protocol.Error as exc: | |
print('Iteration {0} raised exception: {1}'.format(i, exc)) | |
break | |
None if i % freq else print('Iteration {}'.format(i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment