Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[HTCondor-users] Dynamically changing HTCondor configuration when using python binding
- Date: Thu, 05 Dec 2019 23:58:13 +0000
- From: Marco Mambelli <marcom@xxxxxxxx>
- Subject: [HTCondor-users] Dynamically changing HTCondor configuration when using python binding
Greetings,
I'm using some HTCondor commands from a python program either wrapping the binaries or using the bindings (when available).
I need to change dynamically and programmatically some configuration parameters.
When wrapping the commands I'm using os.environ[] to set variables like CONDOR_CONFIG or _CONDOR_...
This works because the commands are in a subshell.
os.environ is not affecting the current environment (of the running interpreter) and the python bindings are executed there, therefore ignoring these changes. I'd like to avoid to have to re-invoke the interpreter in a subprocess.
1. Is it there a way to specify a config file to htcondor.reload_config(), e.g the path in CONDOR_CONFIG from os.environ, not from the environment at the invocation of the python interpreter?
2. And then should I modify the content of htcondor.param (_Param object) with what is in the _CONDOR_... variables?
3. Is it there another better way to change the configuration when using the bindings?
Thank you,
Marco