2022-02-08 15:56:19 +00:00
|
|
|
use pyo3::prelude::*;
|
|
|
|
use pyo3::types::PyString;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
Python::with_gil(|py| {
|
2023-11-21 11:41:43 +00:00
|
|
|
let string = PyString::new_bound(py, "foo");
|
2022-02-08 15:56:19 +00:00
|
|
|
|
|
|
|
py.allow_threads(|| {
|
|
|
|
println!("{:?}", string);
|
|
|
|
});
|
|
|
|
});
|
2023-11-21 11:41:43 +00:00
|
|
|
}
|