This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is the list of recognized commands. | |
""" | |
class Dispatcher(): | |
def __init__(self): | |
self.cmd_list = { | |
'0': self.cmd_0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
McuProtocol is a twisted protocol | |
... | |
class McuProtocol(basic.LineReceiver): | |
def | |
def mcu_requested_shaft_delay_milliseconds(self, *args): | |
""" | |
The MCU requested the shaft delay milliseconds from the config. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.uix.boxlayout import BoxLayout | |
from kivy.app import App | |
from kivy.uix.button import Button | |
from kivy.event import EventDispatcher | |
from kivy.properties import DictProperty | |
class UserManger(EventDispatcher): | |
current_user = DictProperty({'rfid_tag': '', 'nickname': '', 'logged_in': False}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.config import Config | |
Config.set('kivy', 'log_level', 'debug') | |
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.factory import Factory | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.logger import Logger | |
from kivy.clock import Clock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
fromaddr = 'anye...@gmail.com' | |
toaddrs = 'myfr...@gmail.com' | |
msg = 'some one is using this app' | |
username = 'anyem...@gmail.com' | |
password = 'password' | |
server = smtplib.SMTP('smtp.gmail.com:587') | |
server.starttls() | |
server.login(username,password) | |
server.sendmail(fromaddr, toaddrs, msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash-3.2$ python main.py 2>&1 1>/tmp/kivy_last_log.txt | |
[INFO ] [Logger ] Record log in /Users/cfo64nc/.kivy/logs/kivy_16-12-14_56.txt | |
[INFO ] [Kivy ] v1.9.1 | |
[INFO ] [Python ] v2.7.10 (default, Oct 23 2015, 19:19:21) | |
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] | |
Traceback (most recent call last): | |
File "main.py", line 24, in <module> | |
install_twisted_reactor() | |
File "/Library/Python/2.7/site-packages/kivy/support.py", line 164, in install_twisted_reactor | |
import twisted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{u'hold_maintenance_reason': u'Breaking Bits', u'id': 4}, | |
{u'hold_maintenance_reason': u'Head Down', u'id': 3}, | |
{u'hold_maintenance_reason': u'Machine will not start', u'id': 1}, | |
{u'hold_maintenance_reason': u'Making Noise', u'id': 5}, | |
{u'hold_maintenance_reason': u'No Power', u'id': 2}, | |
{u'hold_maintenance_reason': u'Panel not functioning', u'id': 6}] | |
# need to have it look like this for the spinner.values I think. | |
['Machine will not start', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from kivy.base import runTouchApp | |
from kivy.lang import Builder | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.uix.checkbox import CheckBox | |
class NetworkConfig(BoxLayout): | |
def __init__(self, *args, **kwargs): | |
super(NetworkConfig, self).__init__(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from kivy.base import runTouchApp | |
from kivy.lang import Builder | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.uix.checkbox import CheckBox | |
class NetworkConfig(BoxLayout): | |
def __init__(self, *args, **kwargs): | |
super(NetworkConfig, self).__init__(*args, **kwargs) |
OlderNewer