Exemple #1
0
 def _init_prefs(self, prefs):
     run_globals = {}
     if self.ropefolder is not None:
         config = self.get_file(self.ropefolder.path + "/config.py")
         run_globals.update({"__name__": "__main__", "__builtins__": __builtins__, "__file__": config.real_path})
         if config.exists():
             config = self.ropefolder.get_child("config.py")
             exec(config.read(), run_globals)
         else:
             exec(self._default_config(), run_globals)
         if "set_prefs" in run_globals:
             run_globals["set_prefs"](self.prefs)
     for key, value in prefs.items():
         self.prefs[key] = value
     self._init_other_parts()
     self._init_ropefolder()
     if "project_opened" in run_globals:
         run_globals["project_opened"](self)
Exemple #2
0
 def _init_prefs(self, prefs):
     run_globals = {}
     if self.ropefolder is not None:
         config = self.get_file(self.ropefolder.path + '/config.py')
         run_globals.update({'__name__': '__main__',
                             '__builtins__': __builtins__,
                             '__file__': config.real_path})
         if config.exists():
             config = self.ropefolder.get_child('config.py')
             execfile(config.real_path, run_globals)
         else:
             exec(self._default_config(), run_globals)
         if 'set_prefs' in run_globals:
             run_globals['set_prefs'](self.prefs)
     for key, value in prefs.items():
         self.prefs[key] = value
     self._init_other_parts()
     self._init_ropefolder()
     if 'project_opened' in run_globals:
         run_globals['project_opened'](self)
Exemple #3
0
 def _init_prefs(self, prefs):
     run_globals = {}
     if self.ropefolder is not None:
         config = self.get_file(self.ropefolder.path + '/config.py')
         run_globals.update({'__name__': '__main__',
                             '__builtins__': __builtins__,
                             '__file__': config.real_path})
         if config.exists():
             config = self.ropefolder.get_child('config.py')
             exec(config.read(), run_globals)
         else:
             exec(self._default_config(), run_globals)
         if 'set_prefs' in run_globals:
             run_globals['set_prefs'](self.prefs)
     for key, value in prefs.items():
         self.prefs[key] = value
     self._init_other_parts()
     self._init_ropefolder()
     if 'project_opened' in run_globals:
         run_globals['project_opened'](self)
Exemple #4
0
 def _init_prefs(self, prefs):
     run_globals = {}
     if self.ropefolder is not None:
         config = self.get_file(self.ropefolder.path + "/config.py")
         run_globals.update({
             "__name__": "__main__",
             "__builtins__": __builtins__,
             "__file__": config.real_path,
         })
         if config.exists():
             config = self.ropefolder.get_child("config.py")
             pycompat.execfile(config.real_path, run_globals)
         else:
             exec(self._default_config(), run_globals)
         if "set_prefs" in run_globals:
             run_globals["set_prefs"](self.prefs)
     for key, value in prefs.items():
         self.prefs[key] = value
     self._init_other_parts()
     self._init_ropefolder()
     if "project_opened" in run_globals:
         run_globals["project_opened"](self)