Skip to content

Allow configuring renode dynamically #11

@sean-anderson-seco

Description

@sean-anderson-seco

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions