mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 20:14:13 +00:00
12 lines
211 B
Python
Executable File
12 lines
211 B
Python
Executable File
#!/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) |