473,785 Members | 2,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1789
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******* *************** ************@py thon.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 FindFirstChange Notification
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
2734
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 desktop resolution. I have tried trapping the following events: 1) SDL_ACTIVEEVENT 2) SDL_VIDEOEXPOSE
6
9563
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 generic solution. Thanks, Csaba Gabor from New York
3
8353
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 the original web page being loaded on the right. Something like document.frame2.fullyLoaded? You get the idea Thanks F
2
1406
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 changed. Is the only way to do this to go through all the fields and check them against their old values. In which case, would I need to store the values in
5
1837
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 populated) is from several different tables. To the user, of course, this is not seen. Scenario: After the page is populated, assume a change is made to the form and the user hits update. The page then goes back, reads the database for that record...
3
6246
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" onclick="loadFragment()"> ... </a> <a href="#20" onclick="loadFragment()"> ... </a> where loadFragment is a function which does something based on the #20 which is now appended to the document's .location.
2
17532
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") { calculate_positions(); //Resize the main div
1
2606
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 DOM elements that are hidden are made visible (or vice versa). I will have no advance knowledge of the scripts that will be run along with the script I will create. I've implemented a solution that works reasonably well, but I'm not sure if...
15
4233
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 testing for support of particular eventTypes - the DOM 2 Events Interface DocumentEvent says that if the eventType is not supported, it throws a DOM exception. This makes testing rather tough - if you try something like: if (document &&...
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.