Title: add a scope class to manage the context of interaction with Python an… by yagweb · Pull Request #381 · pythonnet/pythonnet · GitHub
Open Graph Title: add a scope class to manage the context of interaction with Python an… by yagweb · Pull Request #381 · pythonnet/pythonnet
X Title: add a scope class to manage the context of interaction with Python an… by yagweb · Pull Request #381 · pythonnet/pythonnet
Description: It‘s a prototype of this proposal here to help its discussion.
Modifications are located at file pythonengine.cs, A class named PyScope was added for the variable management and exchanging between .NET and Python.
Several unit tests were given in a new file "src/embed_tests/pyscope.cs" which can be used as examples.
One of the example,
using (Py.GIL())
{
dynamic ps = Py.CreateScope();
ps.Set("bb", 100); //declare a variable
ps.cc = 10; //declare a variable dynamically
int aa = ps.Eval
Open Graph Description: It‘s a prototype of this proposal here to help its discussion. Modifications are located at file pythonengine.cs, A class named PyScope was added for the variable management and exchanging between ...
X Description: It‘s a prototype of this proposal here to help its discussion. Modifications are located at file pythonengine.cs, A class named PyScope was added for the variable management and exchanging between ...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/381
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:5df6854d-c9be-f695-4c77-99b27279c817 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | B3FA:2AB445:FC2DC:15A481:6970A171 |
| html-safe-nonce | 166ce0e802424937d7d5bff5d518537da40ff4d9a79384c31c07cb10f759b17a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0ZBOjJBQjQ0NTpGQzJEQzoxNUE0ODE6Njk3MEExNzEiLCJ2aXNpdG9yX2lkIjoiMzQyOTgwNDA3NTA5ODYxMjA4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3a4872f6d0e6ff983ee8c3c53f018a73511cd8f88d0aff7a46d25098def8093b |
| hovercard-subject-tag | pull_request:106350371 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/381/checks |
| twitter:image | https://avatars.githubusercontent.com/u/13247575?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/13247575?s=400&v=4 |
| og:image:alt | It‘s a prototype of this proposal here to help its discussion. Modifications are located at file pythonengine.cs, A class named PyScope was added for the variable management and exchanging between ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b06a4c45c45fd0bb038b3759265ea6e38211f45d18130bc65261990be6b5972a |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0e1c4964831785bd64cb22d82e7cf2391ae01f45 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width