parameters: (self)
return_statement: return True
docstring: Iteration of the Modification Time Sentinel
docstring_summary: Iteration of the Modification Time Sentinel
docstring_tokens: Iteration of the Modification Time Sentinel
function: def embfiles_sentinel_iter(self):
          """Iteration of the Modification Time Sentinel"""
          for filepath in self.embfiles_opened.keys():
              if not os.path.isfile(filepath):
                  print "embdrop", filepath
                  del self.embfiles_opened[filepath]
                  break
              if self.embfiles_opened[filepath] != os.path.getmtime(filepath):
                  self.embfiles_opened[filepath] = os.path.getmtime(filepath)
                  data_vec = os.path.basename(filepath).split(cons.CHAR_MINUS)
                  node_id = int(data_vec[0])
                  embfile_id = int(data_vec[1])
                  tree_iter = self.get_tree_iter_from_node_id(node_id)
                  if not tree_iter: continue
                  is_ro = self.get_node_read_only(tree_iter)
                  if is_ro:
                      support.dialog_warning(_("Cannot Edit Embedded File in Read Only Node"), self.window)
                      continue
                  self.treeview_safe_set_cursor(tree_iter)
                  start_iter = self.curr_buffer.get_start_iter()
                  keep_going = True
                  while keep_going:
                      anchor = start_iter.get_child_anchor()
                      if anchor and "pixbuf" in dir(anchor) and "id" in dir(anchor.pixbuf) and anchor.pixbuf.id == embfile_id:
                          with open(filepath, 'rb') as fd:
                              anchor.pixbuf.embfile = fd.read()
                              anchor.pixbuf.time = time.time()
                          self.embfile_set_tooltip(anchor)
                          self.update_window_save_needed("nbuf")
                          self.statusbar.pop(self.statusbar_context_id)
                          self.statusbar.push(self.statusbar_context_id, _("Embedded File Automatically Updated:") + cons.CHAR_SPACE + anchor.pixbuf.filename)
                      keep_going = start_iter.forward_char()
          return True
function_tokens: def embfiles_sentinel_iter ( self ) : for filepath in self . embfiles_opened . keys ( ) : if not os . path . isfile ( filepath ) : print "embdrop" , filepath del self . embfiles_opened [ filepath ] break if self . embfiles_opened [ filepath ] != os . path . getmtime ( filepath ) : self . embfiles_opened [ filepath ] = os . path . getmtime ( filepath ) data_vec = os . path . basename ( filepath ) . split ( cons . CHAR_MINUS ) node_id = int ( data_vec [ 0 ] ) embfile_id = int ( data_vec [ 1 ] ) tree_iter = self . get_tree_iter_from_node_id ( node_id ) if not tree_iter : continue is_ro = self . get_node_read_only ( tree_iter ) if is_ro : support . dialog_warning ( _ ( "Cannot Edit Embedded File in Read Only Node" ) , self . window ) continue self . treeview_safe_set_cursor ( tree_iter ) start_iter = self . curr_buffer . get_start_iter ( ) keep_going = True while keep_going : anchor = start_iter . get_child_anchor ( ) if anchor and "pixbuf" in dir ( anchor ) and "id" in dir ( anchor . pixbuf ) and anchor . pixbuf . id == embfile_id : with open ( filepath , 'rb' ) as fd : anchor . pixbuf . embfile = fd . read ( ) anchor . pixbuf . time = time . time ( ) self . embfile_set_tooltip ( anchor ) self . update_window_save_needed ( "nbuf" ) self . statusbar . pop ( self . statusbar_context_id ) self . statusbar . push ( self . statusbar_context_id , _ ( "Embedded File Automatically Updated:" ) + cons . CHAR_SPACE + anchor . pixbuf . filename ) keep_going = start_iter . forward_char ( ) return True