This website works better with JavaScript.
Home
Explore
Help
Sign In
jmg
/
aiokq
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
add sample program testing if a directory can be watched
main
John-Mark Gurney
5 years ago
parent
bae7061560
commit
9e082a8487
1 changed files
with
14 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+14
-0
misc/kqdir.py
+ 14
- 0
misc/kqdir.py
View File
@@ -0,0 +1,14 @@
import aiokq
import asyncio
import os
fd = os.open('.', os.O_RDONLY)
async def foo():
async with aiokq.watch_file(fd) as wf:
print('a')
await wf()
print('b')
loop = asyncio.get_event_loop()
loop.run_until_complete(foo())
Write
Preview
Loading…
Cancel
Save