chiark
/
gitweb
/
~mdw
/
mLib-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release 1.1.0.
[mLib-python]
/
fwatch.pyx
diff --git
a/fwatch.pyx
b/fwatch.pyx
index 2e484cd5159f656846aa3588ccb55a0277b40cdb..eedb8725e685fa3b3e3af118abc16269ad5869a8 100644
(file)
--- a/
fwatch.pyx
+++ b/
fwatch.pyx
@@
-24,6
+24,11
@@
### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
cdef class FWatch:
### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
cdef class FWatch:
+ """
+ FWatch(FILE): watch FILE for changes
+
+ FILE may be a string, file descriptor, or an object with a `fileno' method.
+ """
cdef fwatch fw
cdef public file
def __cinit__(me, file):
cdef fwatch fw
cdef public file
def __cinit__(me, file):
@@
-37,6
+42,7
@@
cdef class FWatch:
fwatch_initfd(&me.fw, _getfd(file))
me.file = file
def update(me):
fwatch_initfd(&me.fw, _getfd(file))
me.file = file
def update(me):
+ """FW.update() -> RC: nonzero if the file has changed state"""
cdef int rc
if isinstance(me.file, str):
rc = fwatch_update(&me.fw, me.file)
cdef int rc
if isinstance(me.file, str):
rc = fwatch_update(&me.fw, me.file)