Encapsulating eval_bound
"Nicely"
#4557
-
Is there a "nice" way to get the result out of this? pub fn run_python(code: String) -> PyResult<Bound<'_, PyAny>> {
Python::with_gil(|py| py.eval_bound(code, None, None))
}
|
Beta Was this translation helpful? Give feedback.
Answered by
davidhewitt
Sep 15, 2024
Replies: 1 comment 1 reply
-
You can do Python::with_gil(|py| py.eval_bound(code, None, None).unbind()) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jmcph4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do