Title: Add vm.run_bytecode · Issue #6239 · RustPython/RustPython · GitHub
Open Graph Title: Add vm.run_bytecode · Issue #6239 · RustPython/RustPython
X Title: Add vm.run_bytecode · Issue #6239 · RustPython/RustPython
Description: Summary When running run_code_string on the VM, the process first compiles the code into a code object and then executes it. If you store the code object in advance, you can instead execute it using run_code_object. However, for a VM bui...
Open Graph Description: Summary When running run_code_string on the VM, the process first compiles the code into a code object and then executes it. If you store the code object in advance, you can instead execute it usin...
X Description: Summary When running run_code_string on the VM, the process first compiles the code into a code object and then executes it. If you store the code object in advance, you can instead execute it usin...
Opengraph URL: https://github.com/RustPython/RustPython/issues/6239
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add vm.run_bytecode","articleBody":"## Summary\n\n\u003c!-- Short description of the request. Please use incompatibility form to report missing features as Python interpreter --\u003e\n\nWhen running run_code_string on the VM, the process first compiles the code into a code object and then executes it.\nIf you store the code object in advance, you can instead execute it using run_code_object.\nHowever, for a VM built without a compiler, it’s unclear how external code could be executed. One possible solution is to provide a run_bytecode function that allows execution of .pyc files.\n\n## Expected use case\n\n\u003c!-- By sharing detailed use case, we can understand the requirements better! If it will be used by open source projects, please also share the project URL. --\u003e\n\nThis feature is automatically supported when running via the Python CLI, but when using vm directly, there isn’t an equally convenient way to execute code.","author":{"url":"https://github.com/youknowone","@type":"Person","name":"youknowone"},"datePublished":"2025-11-07T01:13:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/6239/RustPython/issues/6239"}
| 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:7f71805b-4a34-2852-4f8c-447c1dfd58a5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9116:2E5741:459A09:5A77D2:696B419A |
| html-safe-nonce | e4e945407a260267d6eb55a110fc3719fdc75441bdaa13b3d2fae01aeed8a109 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTE2OjJFNTc0MTo0NTlBMDk6NUE3N0QyOjY5NkI0MTlBIiwidmlzaXRvcl9pZCI6Ijg3NjA5MDE2OTgzMzU3NTI2MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 61236ef91f7742412f6000152dc164666b49bd0af57ef6725f3dc78e48efe7dc |
| hovercard-subject-tag | issue:3598224094 |
| 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/RustPython/RustPython/6239/issue_layout |
| twitter:image | https://opengraph.githubassets.com/003eb6500e05e880d323398ee79576d009665ef1f8013c4c7ca2e3d426c5d303/RustPython/RustPython/issues/6239 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/003eb6500e05e880d323398ee79576d009665ef1f8013c4c7ca2e3d426c5d303/RustPython/RustPython/issues/6239 |
| og:image:alt | Summary When running run_code_string on the VM, the process first compiles the code into a code object and then executes it. If you store the code object in advance, you can instead execute it usin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | youknowone |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width