py bindings: add headless output mode for apps