Skip to content
Vasili edited this page Sep 11, 2015 · 1 revision

Example

Simple hello world application:

from actuator.application import Application, main
from actuator.definitions.flag import Flag

class MyApplication(Application):
    verbose = Flag()

    def run(self):
        print "Hello, world!" if self.verbose else "Hi!"

if __name__ == '__main__':
    exit(main())

Put the code to hello.py and run as:

$ python hello.py
Hi!
$ python hello.py --verbose
Hello, world!

Clone this wiki locally