Source code for tagit.view.basics

"""View basics.

Part of the tagit module.
A copy of the license is provided with the project.
Author: Matthias Baumgartner, 2016

"""

# exports
__all__ = ('get_root', )

[docs]def colorize(text, color): return '[color=' + color + ']' + text + '[/color]'
[docs]def fontize(text, font): return '[font=' + font + ']' + text + '[/font]'
[docs]def get_root(): """Return the main window. """ from kivy.App import App app = App.get_running_app() if app is not None: return app.root return None ## EOF ##