u6
This commit is contained in:
parent
65411da66c
commit
b865ea307e
2 changed files with 41 additions and 1 deletions
14
src/u6.rs
14
src/u6.rs
|
@ -1 +1,13 @@
|
|||
pub fn main() {}
|
||||
use std::ffi::CString;
|
||||
use pyo3::ffi::c_str;
|
||||
use pyo3::prelude::*;
|
||||
|
||||
static code: &'static str = include_str!("u6.py");
|
||||
|
||||
pub fn main() {
|
||||
Python::with_gil(|py| {
|
||||
let c = CString::new(code.as_bytes()).unwrap();
|
||||
let activator = PyModule::from_code(py, c.as_c_str(), c_str!("main.py"), c_str!("main")).unwrap();
|
||||
activator.call_method("main", (), None).unwrap();
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue