Title: [WIP] Add ability to create module from C# by slide · Pull Request #1447 · pythonnet/pythonnet · GitHub
Open Graph Title: [WIP] Add ability to create module from C# by slide · Pull Request #1447 · pythonnet/pythonnet
X Title: [WIP] Add ability to create module from C# by slide · Pull Request #1447 · pythonnet/pythonnet
Description: What does this implement/fix? Explain your changes. This allows doing something like this, which I haven't found any other way to do: var mod = PythonEngine.AddModule("mymod"); var myobj = new object(); mod.SetAttr("myprop".ToPython(), myobj.ToPython()); import mymod print(mymod.myprop) This is very useful for providing objects to an embedded Python engine. Does this close any currently open issues? I could not find any specific issues that would be related. Any other comments? This is an initial PR to get feedback if this would be allowed, I have a build of the library locally with this change and use this in my code, but would like to have it upstream if possible. I will fill out the remaining details and add tests if folks think this would be ok. Checklist Check all those that are applicable and complete. Make sure to include one or more tests for your change If an enhancement PR, please create docs and at best an example Add yourself to AUTHORS Updated the CHANGELOG
Open Graph Description: What does this implement/fix? Explain your changes. This allows doing something like this, which I haven't found any other way to do: var mod = PythonEngine.AddModule("mymod"); var my...
X Description: What does this implement/fix? Explain your changes. This allows doing something like this, which I haven't found any other way to do: var mod = PythonEngine.AddModule("mymod&qu...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/1447
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0d7733e6-50fe-5c8a-a92f-cb30bc8bd6d8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AF02:51C6B:2E41076:3E7D9AF:69708559 |
| html-safe-nonce | b7d7fd97ee3f5cdb33c93c46d01b299e5b04fefa1637a2d1cdde173be9457186 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjAyOjUxQzZCOjJFNDEwNzY6M0U3RDlBRjo2OTcwODU1OSIsInZpc2l0b3JfaWQiOiI3NTE1MDU1MzI5Mjg1MDE0ODczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6f07078ce7fe4b178a665de1a42e5b1267470896d03f6e1c9e171a1fd2e2717b |
| hovercard-subject-tag | pull_request:620632677 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/pythonnet/pythonnet/pull/1447/files |
| twitter:image | https://avatars.githubusercontent.com/u/55871?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/55871?s=400&v=4 |
| og:image:alt | What does this implement/fix? Explain your changes. This allows doing something like this, which I haven't found any other way to do: var mod = PythonEngine.AddModule("mymod"); var my... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width