mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-26 03:09:13 +00:00
12 lines
211 B
Python
12 lines
211 B
Python
|
#!/usr/bin/env python2.4
|
||
|
|
||
|
import mmap, os, time
|
||
|
mx = mmap.mmap(os.open('xxx',os.O_RDWR), 1)
|
||
|
last = None
|
||
|
while True:
|
||
|
mx.resize(mx.size())
|
||
|
data = mx[:]
|
||
|
if data != last:
|
||
|
print data
|
||
|
last = data
|
||
|
time.sleep(1)
|