Logo Search packages:      
Sourcecode: yagtd version File versions  Download package

def yagtd::GTD::_replace (   self,
  idx,
  line 
) [private]
Replace the task given by its idx by the new line.

Definition at line 353 of file yagtd.py.

                                 :
        """Replace the task given by its idx by the new line."""
        
        # Frist, we need to find the task
        task = self.todo.find('id', idx)
        if task:
            i = self.todo.index(task)
            
            task = Task()  # create a new task
            
            # Parse input line for GTD and additional attributes
            task.add(**self._parse_line(line))
            task.add(id=idx)

            # And, replace it into the to-do list
            self.todo[i] = task


Generated by  Doxygen 1.6.0   Back to index