Run a python script using the [`InterpreterConfig::executable`]. # Panics This function will panic if the [`executable`](InterpreterConfig::executable) is `None`.
(&self, script: &str)
| 868 | /// |
| 869 | /// This function will panic if the [`executable`](InterpreterConfig::executable) is `None`. |
| 870 | pub fn run_python_script(&self, script: &str) -> Result<String> { |
| 871 | run_python_script_with_envs( |
| 872 | Path::new(self.executable.as_ref().expect("no interpreter executable")), |
| 873 | script, |
| 874 | std::iter::empty::<(&str, &str)>(), |
| 875 | ) |
| 876 | } |
| 877 | |
| 878 | /// Run a python script using the [`InterpreterConfig::executable`] with additional |
| 879 | /// environment variables (e.g. PYTHONPATH) set. |