Skip to content

Comments

Fix Stale Python OS Environment when EWTS runs with ngen#9

Merged
cmaynard-ngwpc merged 1 commit intodevelopmentfrom
cmaynard_ewts_fix_os_env_get
Feb 18, 2026
Merged

Fix Stale Python OS Environment when EWTS runs with ngen#9
cmaynard-ngwpc merged 1 commit intodevelopmentfrom
cmaynard_ewts_fix_os_env_get

Conversation

@cmaynard-ngwpc
Copy link

ngen ( C++ ) is calling setenv() after Python has already initialized os.environ, and Python’s os.environ mapping is not automatically refreshed when the environment is mutated from C/C++.

So Python keeps an internal view of the environment that includes things set before Python started (like NGEN_RESULTS_DIR), but not variables injected later from C++ (like NGEN_LOG_FILE_PATH).

Added a helper method to ensure the Python os environment is not stale when LSTM runs.

@cmaynard-ngwpc cmaynard-ngwpc merged commit 39cb324 into development Feb 18, 2026
8 checks passed
@cmaynard-ngwpc cmaynard-ngwpc deleted the cmaynard_ewts_fix_os_env_get branch February 18, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants