gpt4 book ai didi

python - 将自己的参数传递给 ryu 代理应用程序

转载 作者:太空宇宙 更新时间:2023-11-03 15:19:28 24 4
gpt4 key购买 nike

我正在开发ryu应用程序。该应用程序基本上是一个 python 脚本。 ryu 应用程序由 ryu-manager 像这样调用

ryu-manager {filename}

ryu-manager 采用了某些参数。我想知道是否有办法将参数传递到我的文件?

argparse存在用于解析命令行选项的 python 模块,但我不确定它是否会起作用,因为我提供的所有参数都被 ryu-manager 使用,而不是我的脚本。

如有任何帮助,我们将不胜感激。

最佳答案

我还没有尝试过,但是:

"Ryu currently uses oslo.config.cfg for command-line parsing. (ryu/contrib/oslo/config). There are several examples in the tree. ryu/app/tunnel_port_updater.py"

来自 http://comments.gmane.org/gmane.network.ryu.devel/2709

另见 https://github.com/osrg/ryu/blob/master/ryu/app/tunnel_port_updater.py

Ryu 的“入门”页面简单地建议:


ryu-manager [--flagfile <path to configuration file>] [generic/application specific options…]

http://www.osrg.net/ryu/_sources/getting_started.txt

关于python - 将自己的参数传递给 ryu 代理应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17424905/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com