Title: Provide a simple syntax to load resources from __here__ · Issue #259 · python/importlib_resources · GitHub
Open Graph Title: Provide a simple syntax to load resources from __here__ · Issue #259 · python/importlib_resources
X Title: Provide a simple syntax to load resources from __here__ · Issue #259 · python/importlib_resources
Description: Currently, files() requires a parameter indicating from which package to load the resources. A common practice is to pass __package__, meaning load resources from the same package that this module is in. When #203 is solved, it also beco...
Open Graph Description: Currently, files() requires a parameter indicating from which package to load the resources. A common practice is to pass __package__, meaning load resources from the same package that this module ...
X Description: Currently, files() requires a parameter indicating from which package to load the resources. A common practice is to pass __package__, meaning load resources from the same package that this module ...
Opengraph URL: https://github.com/python/importlib_resources/issues/259
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide a simple syntax to load resources from __here__","articleBody":"Currently, `files()` requires a parameter indicating from which package to load the resources. A common practice is to pass `__package__`, meaning load resources from the same package that this module is in.\r\n\r\nWhen #203 is solved, it also becomes possible to use `files(__name__)` to mean the same thing (load resources from the same package that this module is in or for non-package modules other resources found alongside this module).\r\n\r\nPerhaps it would be cleaner and simpler to support `files()` with no parameter, meaning the same thing (load resources alongside this module). No doubt, this form is the most common usage of `files()`. Alternately, `files` could accept the special value \".\" with the same meaning.\r\n\r\nEither implementation would require importlib resources to infer the module from the caller's context. This feature would be an anti-feature if that couldn't be inferred reliably on all Python implementations.","author":{"url":"https://github.com/jaraco","@type":"Person","name":"jaraco"},"datePublished":"2022-07-23T15:41:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/259/importlib_resources/issues/259"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:19fded66-316c-b694-e357-c2974db200f1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCDA:3244AB:18362F0:2087A14:6969C04D |
| html-safe-nonce | 25e6f82a57b1db00020a1ed1aa5d8fc92de379e54650b44e634d748727c6e1ef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0RBOjMyNDRBQjoxODM2MkYwOjIwODdBMTQ6Njk2OUMwNEQiLCJ2aXNpdG9yX2lkIjoiMzY1MjUxMjE1Njc1ODk0OTk2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a6b097133fa132c1122b0699cafc7be50fef49fd52d078e3cac9f28e0fbe5121 |
| hovercard-subject-tag | issue:1315686771 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/importlib_resources/259/issue_layout |
| twitter:image | https://opengraph.githubassets.com/732e72cb2e9fc1fe8018a7a000573633e4596a14e469957c8ae2bc523b9ea2f8/python/importlib_resources/issues/259 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/732e72cb2e9fc1fe8018a7a000573633e4596a14e469957c8ae2bc523b9ea2f8/python/importlib_resources/issues/259 |
| og:image:alt | Currently, files() requires a parameter indicating from which package to load the resources. A common practice is to pass __package__, meaning load resources from the same package that this module ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jaraco |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/importlib_resources git https://github.com/python/importlib_resources.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 306147182 |
| octolytics-dimension-repository_nwo | python/importlib_resources |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 306147182 |
| octolytics-dimension-repository_network_root_nwo | python/importlib_resources |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width