from kivy.app import App

from kivy.uix.scatter import Scatter
from kivy.uix.label import Label
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.textinput import TextInput
from kivy.uix.boxlayout import BoxLayout

from kivy.properties import ListProperty, ObjectProperty

from kivy.graphics.vertex_instructions import (Rectangle,
                                               Ellipse,
                                               Line)
from kivy.graphics.context_instructions import Color

import random
import subprocess
import sys



class ScatterTextWidget(BoxLayout):
    text_colour = ObjectProperty([1, 0, 0, 1])
    def __init__(self, **kwargs):
        super(ScatterTextWidget, self).__init__(**kwargs)


    def change_label_colour(self, *args):
        colour = [random.random() for i in xrange(3)] + [1]
        self.text_colour = colour
    
class TutorialApp(App):
    def build(self):
        return ScatterTextWidget()

if __name__ == "__main__":
    TutorialApp().run()


# Calls phrases-genreal.csv and plucks one (1) random line out of the file.
# and saves this output to temp file, temp-phrase-general.csv (for option to save to a user-phrases.csv.)"""