Title: Allow setting typed objects via PyModule.Set · Issue #2311 · pythonnet/pythonnet · GitHub
Open Graph Title: Allow setting typed objects via PyModule.Set · Issue #2311 · pythonnet/pythonnet
X Title: Allow setting typed objects via PyModule.Set · Issue #2311 · pythonnet/pythonnet
Description: Environment Pythonnet version: 3.0.1 Python version: 3.11 Operating System: Windows 11 .NET Runtime: .NET 4.8 Details Right now, a .NET object can be passed to the Python scripting engine via PyModule.Set, which internally calls ToPython...
Open Graph Description: Environment Pythonnet version: 3.0.1 Python version: 3.11 Operating System: Windows 11 .NET Runtime: .NET 4.8 Details Right now, a .NET object can be passed to the Python scripting engine via PyMod...
X Description: Environment Pythonnet version: 3.0.1 Python version: 3.11 Operating System: Windows 11 .NET Runtime: .NET 4.8 Details Right now, a .NET object can be passed to the Python scripting engine via PyMod...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/2311
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow setting typed objects via PyModule.Set","articleBody":"### Environment\r\n\r\n- Pythonnet version: 3.0.1\r\n- Python version: 3.11\r\n- Operating System: Windows 11\r\n- .NET Runtime: .NET 4.8\r\n\r\n### Details\r\n\r\n- Right now, a .NET object can be passed to the Python scripting engine via PyModule.Set, which internally calls ToPythonDetectType(value)\r\n We'd like to pass a certain interface that the object supports, so only methods of this interface are available for Python scripting.\r\n\r\nI suspect that adding the overloaded method PyModule.Set or ConverterExtension.ToPython that accepts the type of the object may resolve this issue.\r\n","author":{"url":"https://github.com/dmitry-medvedev","@type":"Person","name":"dmitry-medvedev"},"datePublished":"2024-02-01T02:25:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2311/pythonnet/issues/2311"}
| 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:9c7c99da-3bf9-da6d-d4a6-3466480f0483 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 889A:3DAFE8:2E761F6:3E98C98:69705EE3 |
| html-safe-nonce | f4e39ea948d4ea42c5f70e789b7fe27264aa1ed64c2dd44f29c7fe0d8a8bddc4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODlBOjNEQUZFODoyRTc2MUY2OjNFOThDOTg6Njk3MDVFRTMiLCJ2aXNpdG9yX2lkIjoiNTIwMjUwMTE5MzE1MzE0MjQ5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 10c65aef5866111106aebad76b6f4d3147972d7dffe2f3ff0982c6daf7bc987f |
| hovercard-subject-tag | issue:2111355706 |
| 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/pythonnet/pythonnet/2311/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a932381f28fe9cceb69cbaebbd2def4995ac5d02b4330de4e4888189c2105260/pythonnet/pythonnet/issues/2311 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a932381f28fe9cceb69cbaebbd2def4995ac5d02b4330de4e4888189c2105260/pythonnet/pythonnet/issues/2311 |
| og:image:alt | Environment Pythonnet version: 3.0.1 Python version: 3.11 Operating System: Windows 11 .NET Runtime: .NET 4.8 Details Right now, a .NET object can be passed to the Python scripting engine via PyMod... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dmitry-medvedev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| 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 | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width