【发布时间】:2019-06-30 14:35:11
【问题描述】:
我有这样的功能-
def my_func(my_list_arg=["one", "two"]):
我正在尝试使用 python-fire 从命令行调用。
我尝试了几种方法-
尝试 1:
fire_runner.py my_func [one, two]
导致两个单独的参数 "[one" 和 "two]"。
尝试 2:
fire_runner.py my_func ["one", "two"]
结果相同。
尝试 3:
fire_runner.py my_func [\"one\", \"two\"]
同样的结果。
【问题讨论】:
标签: python python-fire