twistd using usage.options in a *.tac file

痴心易碎 提交于 2019-12-10 19:10:59

问题


I'm writing a server with Twisted that is based on a *.tac file that starts the services and the application. I'd like to get one additional command line argument to specify a yaml configuration file. I've tried using usage.Options by building a class that inherits from it, but is choking because of the additional, twistd command line arguments (-y for example) not being specified in my class Options(...) class.

How can get one additional argument and still pass the rest to twistd? Do I have to do this using the plugin system?

Thanks in advance for your help!

Doug


回答1:


A tac file is configuration. It doesn't accept configuration.

If you want to pass command line arguments, you do need to write a plugin.



来源:https://stackoverflow.com/questions/18244050/twistd-using-usage-options-in-a-tac-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!