aboutsummaryrefslogtreecommitdiffstats
path: root/tagit/dialogues/console.py
blob: 282b37842f2aa5b744988de54d2a0a9b6abaabe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""

Part of the tagit module.
A copy of the license is provided with the project.
Author: Matthias Baumgartner, 2022
"""
# standard imports
import os

# kivy imports
from kivy.clock import mainthread
from kivy.lang import Builder
import kivy.properties as kp

# inner-module imports
from .dialogue import Dialogue

# exports
__all__ = ('Console', )


## code ##

# load kv
Builder.load_file(os.path.join(os.path.dirname(__file__), 'console.kv'))

# classes
class Console(Dialogue):
    """Dialogue with console output."""

    text = kp.StringProperty('')

    @mainthread
    def update(self, sender, text):
        self.text = '\n'.join(text)

## EOF ##