We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a27312f commit ae433ddCopy full SHA for ae433dd
crates/processing_pyo3/src/lib.rs
@@ -14,6 +14,8 @@ mod graphics;
14
use graphics::{Graphics, get_graphics, get_graphics_mut};
15
use pyo3::{exceptions::PyRuntimeError, prelude::*};
16
17
+use std::env;
18
+
19
#[pymodule]
20
fn processing(m: &Bound<'_, PyModule>) -> PyResult<()> {
21
m.add_class::<Graphics>()?;
@@ -31,6 +33,10 @@ fn processing(m: &Bound<'_, PyModule>) -> PyResult<()> {
31
33
}
32
34
35
fn get_asset_root() -> PyResult<String> {
36
+ if let Ok(val) = env::var("PROCESSING_ASSET_ROOT") {
37
+ return Ok(val);
38
+ }
39
40
Python::attach(|py| {
41
let sys = PyModule::import(py, "sys")?;
42
let argv: Vec<String> = sys.getattr("argv")?.extract()?;
0 commit comments