Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring renode dynamically #11

Open
sean-anderson-seco opened this issue Oct 31, 2024 · 0 comments
Open

Allow configuring renode dynamically #11

sean-anderson-seco opened this issue Oct 31, 2024 · 0 comments

Comments

@sean-anderson-seco
Copy link

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...

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

No branches or pull requests

1 participant