我是新使用click package。我有一个有两个参数的函数,我只想通过click传递其中一个参数,参数i
在语句if中传递。你知道吗
fig = plt.figure()
ax1 = fig.add_subplot(1,1,1)
@click.command()
@click.argument('filename')
def plot_graph(i, filename):
...
if __name__ == '__main__':
graph_animated = animation.FuncAnimation(fig, plot_graph, interval=1000)
谢谢你!你知道吗
只需将相关代码包装在“command”函数中,并在
filename
变量上使用闭包:相关问题 更多 >
编程相关推荐