162 if not os.path.exists(self.pluginDirs["global"]) and \ |
162 if not os.path.exists(self.pluginDirs["global"]) and \ |
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() |
167 f = open(fname, "w", encoding = "utf-8") |
168 f.write('# -*- coding: utf-8 -*-' + os.linesep) |
168 f.write('# -*- coding: utf-8 -*-' + os.linesep) |
169 f.write(os.linesep) |
169 f.write(os.linesep) |
170 f.write('"""' + os.linesep) |
170 f.write('"""' + os.linesep) |
171 f.write('Package containing the global plugins.' + os.linesep) |
171 f.write('Package containing the global plugins.' + os.linesep) |
172 f.write('"""' + os.linesep) |
172 f.write('"""' + os.linesep) |