Exemplo n.º 1
0
    def init_wrapper(self, contextname, taskname, param):
        param = param.strip()
        x = param.find(' ')
        if x==-1:
            wd = param
            par = ""
        else:
            wd = param[:x]
            par = param[x+1:]
        task.__init__(self, contextname, taskname, par)
        self.cmd_wd = wd
        self['PARAM'] = par
        for k in rc_files:
            ft, cts = rc_files[k]
            fn = self.parse(ft)
            cts = self.parse('\n'.join(cts))
            self[k] = rc_file(fn, cts).path

        self.cmd_template = self.parse(CMD)
Exemplo n.º 2
0
 def __init__(self, contextname, taskname, param):
     task_params = taskname.split(',')
     taskname = task_params[0]
     template.__init__(self)
     self.doc = "This task template has no doc for it's the base class, and not meant to be used directly."
     for p in task_params[1:]:
         words = p.split(':')
         if words[0]=='rc':
             self[words[1]] = rc_file(words[2]).path
     if taskname in all_tasks:
         raise NameError("Task "+taskname+" is already defined!")
     all_tasks[taskname] = self
     self['P'] = contextname
     self['T'] = taskname
     self['RC'] = ide_data_path
     self.task_index = len(all_tasks)
     self.pane_index = -1
     self.window_index = -1
     self.opts = "UNSET"
     self.parent = None
     self.split_opts = ""