Skip to content

Passing paths to python variables  #439

@EthanMarx

Description

@EthanMarx

🚀 Feature request

Given this simple parser setup, is it possible to parse values that are paths to python variables that resolve the the requested type?

parser = jsonargparse.ArgumentParser()
parser.add_argument("--float", type=float)
parser.parse_args(["--float", "math.pi"])

Motivation

Pitch

Alternatives

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions