473,382 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

detecting document changes

Hi,
i'm using wxPython and wxTextStyled.
How can I intercept document changes for active documents (for example modified with others external editors)?
thanks in advance

--

Alessandro Crugnola [sephiroth]
Flash | PHP Developer
http://www.sephiroth.it

Team Macromedia Volunteer for Flash
http://www.macromedia.com/go/team

Flash-php mailing list
http://www.flash-php.it/index.php?ml...tion=subscribe
Jul 18 '05 #1
3 1774
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
Jul 18 '05 #2
"Cliff Wells" <lo******@qwest.net> wrote in message news:<ma**********************************@python. org>...
On Sun, 2003-08-24 at 02:36, Alessandro Crugnola *sephiroth* wrote:
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


Don't know if this is exactly what you're
after, but there are a couple of recipes
on the Cookbook:

This one deals with Linux:

http://aspn.activestate.com/ASPN/Coo.../Recipe/217829

and this one with Win32:

http://aspn.activestate.com/ASPN/Coo.../Recipe/156178

The MSDN docs on FindFirstChangeNotification
tell you which flags you need to use for
modification (as opposed to addition etc.):

http://msdn.microsoft.com/library/de...tification.asp

HTH
TJG
Jul 18 '05 #3
> and this one with Win32:

http://aspn.activestate.com/ASPN/Coo.../Recipe/156178


thanks but that one check only new/deleted/renamed files (also useful indeed).
I should check also for modified files.. but I think i can add the functionallity to that script..

...but is not too stressing for the cpu to check for file changes in a (forever) while loop?

--

Alessandro Crugnola [sephiroth]
Flash | PHP Developer
http://www.sephiroth.it
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the...
6
by: Csaba2000 | last post by:
How do I detect when the font size has been changed (especially by user action: either Ctrl+Scroll wheel or View/Text Size)? This is just for use on IE 5.5+, but it would be great if there was a...
3
by: foldface | last post by:
Hi Given a web page using frames, is there anyway the left frame can request a page in the right frame and, most importantly, detect when it has fully loaded? Ideally this requires no changes to...
2
by: Simon Harvey | last post by:
Hi all, Is there any easy way to check a field for calues that have changed on a post back. So the page is sent to the user, the user changes some values and I need to know which ones...
5
by: needin4mation | last post by:
Hi, I have an asp.net 1.1 application that populates data from a database. When the user changes data, they have to hit a button to update the data. The data entry form (same form that is...
3
by: whapts3 | last post by:
I'm putting together a rather dynamic page (AJAX/all-that-mess). So... to go between different sorts of content on the page, I have it set up something like this. <a href="#10"...
2
by: daveyand | last post by:
Hey Guys I am able to detect a window resize using the following code: window.onresize = function () { if(document.getElementById("parent_for_video").style.display != "none") {...
1
by: Jeff | last post by:
Hi all, I'd like to be able to detect when page content is dynamically changed by Javascript. I'd like to detect any changes to the content, such as the addition of new DOM elements and when...
15
by: RobG | last post by:
When using createEvent, an eventType parameter must be provided as an argument. This can be one of those specified in DOM 2 or 3 Events, or it might be a proprietary eventType. My problem is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.