python from cement import App, Controller, ex class MyController(Controller): class Meta: label = 'my_controller' description = 'This is my sample controller' stacked_on = 'base' stacked_type = 'nested' @ex(help='Print hello world') def hello(self): print('Hello, World!') class MyApp(App): class Meta: label = 'my_app' handlers = [MyController] with MyApp() as app: app.run()


上一篇:
下一篇:
切换中文