Exemple #1
0
def on_message(client, userdata, msg):  #  triggers on an update
    print('topic is: ' + str(msg.topic))
    print('message is: ' + str(msg.payload).replace("b'",'').replace("'",''))
    command = str(msg.payload).replace("b'", '').replace("'", '').lower()
    if command == str('1'):  #  runs dummy file
        dummy.run()
    elif command == str('2'):  #  copy this statement and adjust for each script
        dummy2.run()
    elif "blue" in command:
        colour.blue()
    elif "red" in command:
        colour.red()
    print('')
Exemple #2
0
 def describe(self):
     if ("description" in self._config):
         desc = self._config["description"]
         for line in desc:
             utils.print_message(colour.blue(line))
     else:
         utils.print_message("You see nothing special.")
Exemple #3
0
from colour import blue, green

blue()

print("---")

# error
# yellow()

print("---")

# works:
green()

print("---")

Exemple #4
0
import colour

colour.blue()

print("---")

colour.yellow()

x = input()

import importlib

importlib.reload(colour)

colour.red()

print("---")