PluginManager/PluginManager.py

changeset 245
de5c4effc747
parent 116
2add429042ef
child 415
59a0f9e90768
child 792
a13346916170
equal deleted inserted replaced
243:a1d982e68edf 245:de5c4effc747
163 os.access(Utilities.getPythonModulesDirectory(), os.W_OK): 163 os.access(Utilities.getPythonModulesDirectory(), os.W_OK):
164 # create the global plugins directory 164 # create the global plugins directory
165 os.mkdir(self.pluginDirs["global"], 0o755) 165 os.mkdir(self.pluginDirs["global"], 0o755)
166 fname = os.path.join(self.pluginDirs["global"], "__init__.py") 166 fname = os.path.join(self.pluginDirs["global"], "__init__.py")
167 f = open(fname, "w", encoding = "utf-8") 167 f = open(fname, "w", encoding = "utf-8")
168 f.write('# -*- coding: utf-8 -*-' + os.linesep) 168 f.write('# -*- coding: utf-8 -*-' + "\n")
169 f.write(os.linesep) 169 f.write("\n")
170 f.write('"""' + os.linesep) 170 f.write('"""' + "\n")
171 f.write('Package containing the global plugins.' + os.linesep) 171 f.write('Package containing the global plugins.' + "\n")
172 f.write('"""' + os.linesep) 172 f.write('"""' + "\n")
173 f.close() 173 f.close()
174 if not os.path.exists(self.pluginDirs["global"]): 174 if not os.path.exists(self.pluginDirs["global"]):
175 del self.pluginDirs["global"] 175 del self.pluginDirs["global"]
176 else: 176 else:
177 del self.pluginDirs["user"] 177 del self.pluginDirs["user"]

eric ide

mercurial