It's not currently possible to set the renode configuration except via environmental variables. This is pretty inconvenient, since we can't do any configuration from python. This could be used to set sensible defaults or use configuration from command line arguments or configuration files. I'd like to be able to do something like
from pyrenode3 import env
env.pyrenode_build_dir = get_build_dir()
but importing pyrenode3.env implicitly imports pyrenode itself, which in turn automatically imports pyrenode3.env. So by the time we can modify the environment, the module is already interpreted. An even better way would be something like
from pyrenode3 import load
load(build_dir=get_build_dir())
Of course, you can always do something like
import os
os.environ["PYRENODE_BUILD_DIR"] = get_build_dir()
import pyrenode3
but I'm not a big fan of doing configuration via environmental variables in the first place...
It's not currently possible to set the renode configuration except via environmental variables. This is pretty inconvenient, since we can't do any configuration from python. This could be used to set sensible defaults or use configuration from command line arguments or configuration files. I'd like to be able to do something like
but importing
pyrenode3.envimplicitly importspyrenodeitself, which in turn automatically importspyrenode3.env. So by the time we can modify the environment, the module is already interpreted. An even better way would be something likeOf course, you can always do something like
but I'm not a big fan of doing configuration via environmental variables in the first place...