initial commit (ready for pypi)

This commit is contained in:
George K
2018-02-16 19:52:02 +03:00
parent c4fd5eace6
commit 062b7933a2
6 changed files with 68 additions and 0 deletions

21
examples/simple.py Normal file
View File

@@ -0,0 +1,21 @@
import asyncio
from datetime import datetime
from seppuku import killme_after
loop = asyncio.get_event_loop()
def run():
start_time = datetime.now()
print('Started')
killme_after(2, loop)
try:
loop.run_forever()
except KeyboardInterrupt:
print('KeyboardInterrupt after {}'.format(datetime.now() - start_time))
if __name__ == '__main__':
run()