#!/bin/env python3
# -*- coding: utf-8 -*-
-__version__ = '0.10.8'
+__version__ = '0.10.9'
# vim: ts=4 et list
}
# -------------------------------------------------------------------------
- def __init__(self, appname=None, verbose=0, version=__version__):
+ def __init__(self, output_type='json', appname=None, verbose=0, version=__version__):
"""Constructor."""
self.description = textwrap.dedent('''\
''').strip()
self.cache_file = None
- self._output_type = 'json'
+ self._output_type = output_type
self.filters = None
super(ShowModulesApp, self).__init__(
MY_APPNAME = os.path.basename(sys.argv[0])
LOG = logging.getLogger(MY_APPNAME)
-app = ShowModulesApp(appname=MY_APPNAME)
-app._output_type = 'html'
+app = ShowModulesApp(output_type='html', appname=MY_APPNAME)
if app.verbose > 2:
LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
MY_APPNAME = os.path.basename(sys.argv[0])
LOG = logging.getLogger(MY_APPNAME)
-app = ShowModulesApp(appname=MY_APPNAME)
-app._output_type = 'txt'
+app = ShowModulesApp(output_type='txt', appname=MY_APPNAME)
if app.verbose > 2:
LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))