We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cdce8c commit 3793a32Copy full SHA for 3793a32
1 file changed
source-code/src/main.rs
@@ -1,12 +1,8 @@
1
use pyo3::prelude::*;
2
-use std::fs::read_to_string;
3
-use std::path::Path;
4
5
fn main() -> PyResult<()> {
6
- let script_path = Path::new("terminal/main.py");
7
- let code = read_to_string(script_path).expect("Failed to read main.py");
8
-
+ let code = include_str!("../terminal/main.py");
9
Python::with_gil(|py| {
10
- py.run_bound(&code, None, None)
+ py.run_bound(code, None, None)
11
})
12
}
0 commit comments