detecting document changes

Cliff Wells logiplex at qwest.net
Mon Aug 25 16:42:52 EDT 2003


On Sun, 2003-08-24 at 02:36, Alessandro Crugnola *sephiroth* wrote:
> Hi,
> i'm using wxPython and wxTextStyled.
> How can I intercept document changes for active documents (for example
> modified with others external editors)?

If you're on Linux (and perhaps other Unices) you can use FAM (file
alteration monitor).  There's a Python library for the SGI version of
FAM (I don't know if it will work with anything other than XFS):

http://python-fam.sourceforge.net/

also check out this link:

http://oss.sgi.com/projects/fam/faq.html

If you're looking for a more general or cross-platform solution then
probably just periodically checking timestamp/size/md5sum for the file
is another (albeit somewhat less elegant) option.

Regards,

-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726  (800) 735-0555






More information about the Python-list mailing list