deonis 0 Light Poster

Hello !
I'm wondering is there simple way in python to check for file modifications by external sources similar to what existing in gedit or drpython (text editors). So far I was able to check for file modification but I don't know how to "call" this function(see code bellow). I assume, it should be "called" then windows of the text editor become active or something like this but I am not sure that this is the right way to do that.
BTW I'm using wxPython for my gui.
any help, suggestion would be highly appreciated!

......
self.fmtime = int(os.stat("/home/denis/help.txt").st_mtime)
def onModify(self, event):  
                if os.path.exists("/home/denis/help.txt"):
                        self.fmtime2 = int(os.stat("/home/denis/help.txt").st_mtime)
                        print "file modified", self.fmtime2
                        if self.fmtime!=self.fmtime2:
                           doreload = wx.MessageDialog( self, "reload file ? \n",
                                        "Reload file ...", wx.YES_NO)
                           igot = doreload.ShowModal() # Shows it
                           if igot == wx.ID_YES:
                                 self.DoReload(event)