ZFS Automatic Snapshot Daemon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
427 B

import asyncio
import asyncio.subprocess as subprocess
from subprocess import PIPE
import locale
import code
async def main():
proc = await subprocess.create_subprocess_exec(
'/usr/local/bin/fswatch', '-o', '/', stdout=PIPE)
assert proc.stdout is not None
while True:
line = (await proc.stdout.readline()).decode(locale.getpreferredencoding())
print('Got line:', line)
asyncio.run(main())