Overview
Comment: | shift warning for undiscoverable modules |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
18c5918a6d4cdba063ae15f344c155e4 |
User & Date: | mario on 2022-11-01 23:30:26 |
Other Links: | manifest | tags |
Context
2022-11-12
| ||
15:25 | introduce plugin_icon() for gui window check-in: 64c2c60322 user: mario tags: trunk | |
2022-11-01
| ||
23:30 | shift warning for undiscoverable modules check-in: 18c5918a6d user: mario tags: trunk | |
23:30 | predefine conf[plugins], note .base(__package__) as example check-in: 94218baefa user: mario tags: trunk | |
Changes
Modified pluginconf/__init__.py from [295be38bfd] to [8fbfda3a70].
︙ | |||
183 184 185 186 187 188 189 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + | return execute return wrapped # Resource retrieval # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ @renamed_arguments({"fn": "filename", "gz": "gzip"}) |
︙ | |||
206 207 208 209 210 211 212 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | + - + | data = pkgutil.get_data(file_root or data_root, filename) if gzip: data = gzip_decode(data) if decode: return data.decode("utf-8", errors='ignore') return str(data) except: #(FileNotFoundError, IOError, OSError, ImportError, gzip.BadGzipFile): if warn: |
︙ | |||
287 288 289 290 291 292 293 | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | - + + + | # Try via pkgutil first, # find any plugins.* modules, or main packages if module: search = plugin_base + kwargs.get("extra_base", []) for base, sfx in itertools.product(search, [".py", "/__init__.py"]): try: #log.debug(f"mod={base} fn={filename}.py") |
︙ |