From 343f38b9902e950b954685698a6c8ea104ad7270 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Sun, 22 Dec 2013 12:21:32 -0200 Subject: [PATCH 01/17] Allow launch via Kivy Launcher --- android.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 android.txt diff --git a/android.txt b/android.txt new file mode 100644 index 0000000..da1c648 --- /dev/null +++ b/android.txt @@ -0,0 +1,3 @@ +title=Kivy Remote Shell +author=tito +orientation=portrait From e08f7cdda39087b7cd8f5d2d705a8f9d5727721b Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Sun, 22 Dec 2013 12:23:02 -0200 Subject: [PATCH 02/17] Require updated version of Kivy --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index b7c3798..6f1bb65 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,8 @@ __version__ = '0.1' +import kivy +kivy.require('1.8.0') + # install_twisted_rector must be called before importing and using the reactor from kivy.support import install_twisted_reactor install_twisted_reactor() From 32bb3f707c0abd8a5ca95b9c26053248bba3ed63 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Mon, 23 Dec 2013 03:58:12 -0200 Subject: [PATCH 03/17] Allow service Conflicts: main.py --- main.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 6f1bb65..45344bb 100644 --- a/main.py +++ b/main.py @@ -20,6 +20,10 @@ from kivy.garden import navigationdrawer from kivy.uix.screenmanager import Screen + +from service import ServiceAppMixin +import time + app = None @@ -62,15 +66,24 @@ def get_interface_ip(self, ifname): )[20:24]) -class RemoteKivyApp(App): +class RemoteKivyApp(App, ServiceAppMixin): def build(self): global app app = self + #self.start_service('kivy-remote-shell service running...') + #time.sleep(10) self.connection = reactor.listenTCP(8000, getManholeFactory(globals(), admin='kivy')) def on_pause(self): return True + def on_resume(self): + return + + def on_stop(self): + if hasattr(self, 'service'): + self.stop_service() + if __name__ == '__main__': RemoteKivyApp().run() From 3dc81d915a53ab1f7d55cebe626211a428b9bcc7 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Mon, 23 Dec 2013 05:21:33 -0200 Subject: [PATCH 04/17] Service added Conflicts: main.py --- .gitignore | 2 ++ main.py | 4 +++- service/__init__.py | 31 +++++++++++++++++++++++++++++++ service/main.py | 12 ++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 service/__init__.py create mode 100644 service/main.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..25e1180 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +**.pyc +.vagrant/** diff --git a/main.py b/main.py index 45344bb..004ab7b 100644 --- a/main.py +++ b/main.py @@ -66,14 +66,16 @@ def get_interface_ip(self, ifname): )[20:24]) -class RemoteKivyApp(App, ServiceAppMixin): +class RemoteKivyApp(App): def build(self): global app app = self #self.start_service('kivy-remote-shell service running...') #time.sleep(10) + print 'Creating reactor' self.connection = reactor.listenTCP(8000, getManholeFactory(globals(), admin='kivy')) + print 'Reactor created' def on_pause(self): return True diff --git a/service/__init__.py b/service/__init__.py new file mode 100644 index 0000000..54b8e6c --- /dev/null +++ b/service/__init__.py @@ -0,0 +1,31 @@ +import kivy.utils +from kivy import platform as PLATFORM +if PLATFORM == 'android': + import android +else: + android = None + +class ServiceAppMixin(object): + def start_service(self, arg=''): + if PLATFORM == 'android': + self.service = android.AndroidService(title='Sevice example', description='service is running') + self.service.start(arg) # accepts an argument, handled to PYTHON_SERVICE_ARGUMENT + return True + else: + from multiprocessing import Process + def _run_service(arg=arg): + import os + os.environ['PYTHON_SERVICE_ARGUMENT'] = arg + import service.main + self.service = Process(target=_run_service) + self.service.start() + return False + + def stop_service(self): + if PLATFORM == 'android': + self.service.stop() + return True + else: + import os, signal + os.kill(self.service.pid, signal.SIGKILL) + return False diff --git a/service/main.py b/service/main.py new file mode 100644 index 0000000..82b1b0c --- /dev/null +++ b/service/main.py @@ -0,0 +1,12 @@ +import os +import time + +# get the argument passed +arg = os.getenv('PYTHON_SERVICE_ARGUMENT') + +while True: + # this will print PYTHON_SERVICE_ARGUMENT content continually, even when application is switched + print arg + #from snips import native_toast + #native_toast(arg, True) + time.sleep(3) From ce9ade94b34aefbb4d25bbd8b7ad27d93ecbf50d Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Sat, 11 Jan 2014 05:24:35 -0200 Subject: [PATCH 05/17] Twisted Reactor moved to Android service Conflicts: main.py --- main.py | 27 ++++----------------------- service/__init__.py | 2 +- service/main.py | 34 ++++++++++++++++++++++++++++------ 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/main.py b/main.py index 004ab7b..2557ece 100644 --- a/main.py +++ b/main.py @@ -4,15 +4,12 @@ kivy.require('1.8.0') # install_twisted_rector must be called before importing and using the reactor -from kivy.support import install_twisted_reactor -install_twisted_reactor() +#from kivy.support import install_twisted_reactor +#install_twisted_reactor() import socket import fcntl import struct -from twisted.internet import reactor -from twisted.cred import portal, checkers -from twisted.conch import manhole, manhole_ssh from kivy.lang import Builder from kivy.uix.floatlayout import FloatLayout from kivy.properties import StringProperty @@ -27,17 +24,6 @@ app = None -def getManholeFactory(namespace, **passwords): - realm = manhole_ssh.TerminalRealm() - def getManhole(_): - return manhole.ColoredManhole(namespace) - realm.chainedProtocolFactory.protocolFactory = getManhole - p = portal.Portal(realm) - p.registerChecker( - checkers.InMemoryUsernamePasswordDatabaseDontUse(**passwords)) - f = manhole_ssh.ConchFactory(p) - return f - class MainScreen(Screen): lan_ip = StringProperty('127.0.0.1') @@ -66,16 +52,11 @@ def get_interface_ip(self, ifname): )[20:24]) -class RemoteKivyApp(App): +class RemoteKivyApp(App, ServiceAppMixin): def build(self): global app app = self - #self.start_service('kivy-remote-shell service running...') - #time.sleep(10) - print 'Creating reactor' - self.connection = reactor.listenTCP(8000, - getManholeFactory(globals(), admin='kivy')) - print 'Reactor created' + self.start_service('kivy-remote-shell service running...') def on_pause(self): return True diff --git a/service/__init__.py b/service/__init__.py index 54b8e6c..843a0c5 100644 --- a/service/__init__.py +++ b/service/__init__.py @@ -8,7 +8,7 @@ class ServiceAppMixin(object): def start_service(self, arg=''): if PLATFORM == 'android': - self.service = android.AndroidService(title='Sevice example', description='service is running') + self.service = android.AndroidService(title='Kivy Remote Shell', description='Twisted reactor running') self.service.start(arg) # accepts an argument, handled to PYTHON_SERVICE_ARGUMENT return True else: diff --git a/service/main.py b/service/main.py index 82b1b0c..d120a85 100644 --- a/service/main.py +++ b/service/main.py @@ -1,12 +1,34 @@ import os import time +# install_twisted_rector must be called before importing and using the reactor +#from kivy.support import install_twisted_reactor +#install_twisted_reactor() + +from twisted.internet import reactor +from twisted.cred import portal, checkers +from twisted.conch import manhole, manhole_ssh + + # get the argument passed arg = os.getenv('PYTHON_SERVICE_ARGUMENT') -while True: - # this will print PYTHON_SERVICE_ARGUMENT content continually, even when application is switched - print arg - #from snips import native_toast - #native_toast(arg, True) - time.sleep(3) + +def getManholeFactory(namespace, **passwords): + realm = manhole_ssh.TerminalRealm() + def getManhole(_): + return manhole.ColoredManhole(namespace) + realm.chainedProtocolFactory.protocolFactory = getManhole + p = portal.Portal(realm) + p.registerChecker( + checkers.InMemoryUsernamePasswordDatabaseDontUse(**passwords)) + f = manhole_ssh.ConchFactory(p) + return f + +print 'Creating twisted reactor' +connection = reactor.listenTCP(8000, + getManholeFactory(globals(), admin='kivy')) + +print 'Twisted reactor starting' +reactor.run() +print 'Twisted reactor stopped' From 47dce112d40151956a0d14aff49cb48ae73bf29c Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Sat, 11 Jan 2014 15:49:49 -0200 Subject: [PATCH 06/17] [FIX] Not running on Kivy pre-1.8 --- service/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/__init__.py b/service/__init__.py index 843a0c5..bbb898f 100644 --- a/service/__init__.py +++ b/service/__init__.py @@ -1,5 +1,11 @@ import kivy.utils from kivy import platform as PLATFORM + +try: # hack for Kivy pre-1.8 + PLATFORM = PLATFORM() +except TypeError: + pass + if PLATFORM == 'android': import android else: From 783a30323a7f0a43a143e2b27eced561a525331f Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Sat, 11 Jan 2014 15:59:50 -0200 Subject: [PATCH 07/17] It is still compatible with Kivy pre-1.8 --- main.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/main.py b/main.py index 2557ece..29191fb 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,5 @@ __version__ = '0.1' -import kivy -kivy.require('1.8.0') - # install_twisted_rector must be called before importing and using the reactor #from kivy.support import install_twisted_reactor #install_twisted_reactor() From a10ea33e98cfebce179ed060a2a741c1e069b9ee Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Tue, 21 Jan 2014 01:53:30 -0200 Subject: [PATCH 08/17] twistedshell.install_shell() for service or not --- main.py | 4 +++- service/main.py | 34 +++++----------------------------- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/main.py b/main.py index 29191fb..ceca6f1 100644 --- a/main.py +++ b/main.py @@ -16,7 +16,7 @@ from kivy.uix.screenmanager import Screen from service import ServiceAppMixin -import time +import twistedshell app = None @@ -53,6 +53,8 @@ class RemoteKivyApp(App, ServiceAppMixin): def build(self): global app app = self + + #twistedshell.install_shell(context=globals(), service=False) self.start_service('kivy-remote-shell service running...') def on_pause(self): diff --git a/service/main.py b/service/main.py index d120a85..443dddd 100644 --- a/service/main.py +++ b/service/main.py @@ -1,34 +1,10 @@ import os -import time - -# install_twisted_rector must be called before importing and using the reactor -#from kivy.support import install_twisted_reactor -#install_twisted_reactor() - -from twisted.internet import reactor -from twisted.cred import portal, checkers -from twisted.conch import manhole, manhole_ssh - +# Hack to allow import from main app dir: +_parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +os.sys.path.insert(0, _parentdir) # get the argument passed arg = os.getenv('PYTHON_SERVICE_ARGUMENT') - -def getManholeFactory(namespace, **passwords): - realm = manhole_ssh.TerminalRealm() - def getManhole(_): - return manhole.ColoredManhole(namespace) - realm.chainedProtocolFactory.protocolFactory = getManhole - p = portal.Portal(realm) - p.registerChecker( - checkers.InMemoryUsernamePasswordDatabaseDontUse(**passwords)) - f = manhole_ssh.ConchFactory(p) - return f - -print 'Creating twisted reactor' -connection = reactor.listenTCP(8000, - getManholeFactory(globals(), admin='kivy')) - -print 'Twisted reactor starting' -reactor.run() -print 'Twisted reactor stopped' +import twistedshell +twistedshell.install_shell(context=globals(), service=True) From d9b44e2e7b9ec003ad16e064cb6b64a3cdeb53c9 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Tue, 21 Jan 2014 02:49:39 -0200 Subject: [PATCH 09/17] Defaults to Activity-based shell Conflicts: main.py --- main.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index ceca6f1..967d758 100644 --- a/main.py +++ b/main.py @@ -48,14 +48,21 @@ def get_interface_ip(self, ifname): struct.pack('256s', ifname[:15]) )[20:24]) + def on_use_service_active(self, *args, **kwargs): + if self.use_service: + # TODO: How to stop the twisted shell running? + app.start_service() + else: + app.stop_service() + twistedshell.install_shell(context=globals(), service=False) + class RemoteKivyApp(App, ServiceAppMixin): def build(self): global app app = self - #twistedshell.install_shell(context=globals(), service=False) - self.start_service('kivy-remote-shell service running...') + twistedshell.install_shell(context=globals(), service=False) def on_pause(self): return True From 7d3e199bb68b3176ecafeab270d9e5ccc1d3db55 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Tue, 21 Jan 2014 02:50:10 -0200 Subject: [PATCH 10/17] Minimal layout to backend choose Conflicts: main.py --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 967d758..1d78bcc 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,7 @@ import struct from kivy.lang import Builder from kivy.uix.floatlayout import FloatLayout -from kivy.properties import StringProperty +from kivy.properties import StringProperty, BooleanProperty from kivy.app import App from kivy.garden import navigationdrawer @@ -24,6 +24,7 @@ class MainScreen(Screen): lan_ip = StringProperty('127.0.0.1') + use_service = BooleanProperty() def __init__(self, **kwargs): super(MainScreen, self).__init__(**kwargs) From 1aae8091486595fa64ae0fe2c9ff6ba793222251 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Tue, 21 Jan 2014 02:52:23 -0200 Subject: [PATCH 11/17] Oops: forgot the best part - twistedshell.py --- twistedshell.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 twistedshell.py diff --git a/twistedshell.py b/twistedshell.py new file mode 100644 index 0000000..c5ef1dd --- /dev/null +++ b/twistedshell.py @@ -0,0 +1,37 @@ +#coding: utf-8 + +def getManholeFactory(namespace, **passwords): + from twisted.cred import portal, checkers + from twisted.conch import manhole, manhole_ssh + + realm = manhole_ssh.TerminalRealm() + def getManhole(_): + return manhole.ColoredManhole(namespace) + realm.chainedProtocolFactory.protocolFactory = getManhole + p = portal.Portal(realm) + p.registerChecker( + checkers.InMemoryUsernamePasswordDatabaseDontUse(**passwords)) + f = manhole_ssh.ConchFactory(p) + return f + + +def install_shell(context={}, service=False): + if not service: + # install_twisted_rector must be called before importing and using the reactor + from kivy.support import install_twisted_reactor + install_twisted_reactor() + + from twisted.internet import reactor + + print 'Creating twisted reactor' + connection = reactor.listenTCP(8000, + getManholeFactory(context, admin='kivy') + ) + + if service: + # service-based have no implicit reactor running. + print 'Twisted reactor starting' + reactor.run() + print 'Twisted reactor stopped' + else: + return connection From 4ae3627d768cd6776a12d831feef8ffdca2b1674 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Wed, 22 Jan 2014 00:10:40 -0200 Subject: [PATCH 12/17] Working toggle, but needs patched Kivy Conflicts: main.py --- main.py | 25 ++++++++++------ twistedshell.py | 78 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 79 insertions(+), 24 deletions(-) diff --git a/main.py b/main.py index 1d78bcc..43c3692 100644 --- a/main.py +++ b/main.py @@ -11,6 +11,7 @@ from kivy.uix.floatlayout import FloatLayout from kivy.properties import StringProperty, BooleanProperty from kivy.app import App +from kivy.clock import Clock from kivy.garden import navigationdrawer from kivy.uix.screenmanager import Screen @@ -49,13 +50,8 @@ def get_interface_ip(self, ifname): struct.pack('256s', ifname[:15]) )[20:24]) - def on_use_service_active(self, *args, **kwargs): - if self.use_service: - # TODO: How to stop the twisted shell running? - app.start_service() - else: - app.stop_service() - twistedshell.install_shell(context=globals(), service=False) + def on_use_service(self, instance, value): + app.start_shell(service=value) class RemoteKivyApp(App, ServiceAppMixin): @@ -63,8 +59,6 @@ def build(self): global app app = self - twistedshell.install_shell(context=globals(), service=False) - def on_pause(self): return True @@ -75,5 +69,18 @@ def on_stop(self): if hasattr(self, 'service'): self.stop_service() + def start_shell(self, service=False): + if service: # For now on, use the Service! + if hasattr(self, '_twisted_connection'): + twistedshell.uninstall_shell(service=False, connections=[self._twisted_connection]) + del self._twisted_connection + self.start_service() + + else: # For now on, use the Activity! + if hasattr(self, 'service'): + self.stop_service() + self._twisted_connection = twistedshell.install_shell(context=globals(), service=False) + + if __name__ == '__main__': RemoteKivyApp().run() diff --git a/twistedshell.py b/twistedshell.py index c5ef1dd..cab4f69 100644 --- a/twistedshell.py +++ b/twistedshell.py @@ -1,4 +1,26 @@ #coding: utf-8 +from threading import Lock +from kivy.logger import Logger + +INSTALL_SHELL_LOCK = Lock() + + +def _block_on(d, timeout=None): + '''Blocks waiting for a deferred to return something, or fail''' + from Queue import Queue, Empty + from twisted.python.failure import Failure + + q = Queue() + d.addBoth(q.put) + try: + ret = q.get(True, timeout) + except Empty: + raise Empty + if isinstance(ret, Failure): + ret.raiseException() + else: + return ret + def getManholeFactory(namespace, **passwords): from twisted.cred import portal, checkers @@ -16,22 +38,48 @@ def getManhole(_): def install_shell(context={}, service=False): - if not service: - # install_twisted_rector must be called before importing and using the reactor - from kivy.support import install_twisted_reactor - install_twisted_reactor() + with INSTALL_SHELL_LOCK: + if service: + from twisted.internet import default + default.install() + else: + # install_twisted_rector must be called before importing and using the reactor + from kivy.support import install_twisted_reactor + install_twisted_reactor() - from twisted.internet import reactor + from twisted.internet import reactor - print 'Creating twisted reactor' - connection = reactor.listenTCP(8000, - getManholeFactory(context, admin='kivy') - ) + print 'Creating twisted reactor. Service:', service + connection = reactor.listenTCP(8001, + getManholeFactory(context, admin='kivy') + ) + if service: + # service-based have no implicit reactor running. + print 'Twisted reactor starting' + reactor.run() + print 'Twisted reactor stopped' + else: + return connection + +def uninstall_shell(service=False, connections=[]): if service: - # service-based have no implicit reactor running. - print 'Twisted reactor starting' - reactor.run() - print 'Twisted reactor stopped' - else: - return connection + raise NotImplementedError() + + defers = [] + for c in connections: + defers.append(c.stopListening()) + + from Queue import Empty + import kivy.support + while True: + kivy.support._twisted_reactor_work() + try: + for d in defers: + _block_on(d, timeout=1) + except Empty: + continue + break + + from kivy.support import uninstall_twisted_reactor + uninstall_twisted_reactor() From bcc37b28dab49ea4cf374fd5226a9a5736db7196 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Wed, 22 Jan 2014 00:13:25 -0200 Subject: [PATCH 13/17] Better debug messages --- twistedshell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/twistedshell.py b/twistedshell.py index cab4f69..a1bd7a7 100644 --- a/twistedshell.py +++ b/twistedshell.py @@ -49,16 +49,16 @@ def install_shell(context={}, service=False): from twisted.internet import reactor - print 'Creating twisted reactor. Service:', service + Logger.debug('Shell: Creating twisted reactor. Service: %s', service) connection = reactor.listenTCP(8001, getManholeFactory(context, admin='kivy') ) if service: # service-based have no implicit reactor running. - print 'Twisted reactor starting' + Logger.debug('Shell: Twisted reactor starting') reactor.run() - print 'Twisted reactor stopped' + Logger.debug('Shell: Twisted reactor stopped') else: return connection From 7795b9934c96729ae2a91f119d4d354faabf1335 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Wed, 22 Jan 2014 00:15:42 -0200 Subject: [PATCH 14/17] twistedshell.py -> shell.py --- main.py | 6 +++--- twistedshell.py => shell.py | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename twistedshell.py => shell.py (100%) diff --git a/main.py b/main.py index 43c3692..c86dd1b 100644 --- a/main.py +++ b/main.py @@ -17,7 +17,7 @@ from kivy.uix.screenmanager import Screen from service import ServiceAppMixin -import twistedshell +import shell app = None @@ -72,14 +72,14 @@ def on_stop(self): def start_shell(self, service=False): if service: # For now on, use the Service! if hasattr(self, '_twisted_connection'): - twistedshell.uninstall_shell(service=False, connections=[self._twisted_connection]) + shell.uninstall_shell(service=False, connections=[self._twisted_connection]) del self._twisted_connection self.start_service() else: # For now on, use the Activity! if hasattr(self, 'service'): self.stop_service() - self._twisted_connection = twistedshell.install_shell(context=globals(), service=False) + self._twisted_connection = shell.install_shell(context=globals(), service=False) if __name__ == '__main__': diff --git a/twistedshell.py b/shell.py similarity index 100% rename from twistedshell.py rename to shell.py From 47049c65489f19c369803dcbbbf9e47a6c6ca6d6 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Wed, 22 Jan 2014 00:45:22 -0200 Subject: [PATCH 15/17] Oops: forgot some development-environ stuff --- service/main.py | 4 ++-- shell.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service/main.py b/service/main.py index 443dddd..80e6f2d 100644 --- a/service/main.py +++ b/service/main.py @@ -6,5 +6,5 @@ # get the argument passed arg = os.getenv('PYTHON_SERVICE_ARGUMENT') -import twistedshell -twistedshell.install_shell(context=globals(), service=True) +import shell +shell.install_shell(context=globals(), service=True) diff --git a/shell.py b/shell.py index a1bd7a7..aaee0c1 100644 --- a/shell.py +++ b/shell.py @@ -50,7 +50,7 @@ def install_shell(context={}, service=False): from twisted.internet import reactor Logger.debug('Shell: Creating twisted reactor. Service: %s', service) - connection = reactor.listenTCP(8001, + connection = reactor.listenTCP(8000, getManholeFactory(context, admin='kivy') ) From fb87f25b9f5c8d126932a991021f7fa45d8143c1 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Wed, 22 Jan 2014 00:48:38 -0200 Subject: [PATCH 16/17] Needs patched Kivy. At least require 1.8.0-patched! --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index c86dd1b..e6a6e85 100644 --- a/main.py +++ b/main.py @@ -12,6 +12,8 @@ from kivy.properties import StringProperty, BooleanProperty from kivy.app import App from kivy.clock import Clock +import kivy +kivy.require('1.8.0') from kivy.garden import navigationdrawer from kivy.uix.screenmanager import Screen From 87a34f4ed0659fb91b0f77bff5d669127a16585c Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Sat, 24 Dec 2016 15:05:54 -0200 Subject: [PATCH 17/17] Get "hostname.local" if "hostname" ip not found --- .../garden.navigationdrawer/__init__.pyc | Bin 23935 -> 24173 bytes main.py | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/garden/garden.navigationdrawer/__init__.pyc b/libs/garden/garden.navigationdrawer/__init__.pyc index 1ba01f15ad71f6c38d1000debf4fe2a72754a583..ed96d26b5e37d8663974297980ff209970a4e20d 100644 GIT binary patch delta 1217 zcmeyri}CFqMh@oByj+VH#6@i6a8r?rU|?X-4=qkDD%MZTNzBViDb_D8O4d)$EZLl> zBFc(KesZFU^X4;}Q<(6nX|!{nyi4aT0VSIm^$HmAsR3Fw`M7>BJ|&HI&YM>m$m4Yl z$i?!;_V}#YTxc>GpZsKyJyB-C1l2HGFcMNTIm+@hAum;11>p4($T^C(z67i)Wn|s_ z-R>`5lR$yvh`HenWN^}1?QV|O9FWf}Jj?K@*?iE;pM^jOPEPYL zC#1wUU;!Z|nt>Jglz&Et6H<~FTu4ZXX$V0je?n3SnX)Z3iI9@KFoLFN dg!d3Kg)5?ifRfEGBI20wsR5>i$#Y^J0|2aZnHB&5 delta 994 zcmaF6hw=X|Mh@oByj-)MgoSP7a8nTuWME*>&&bbB)z8i>tJF`Xk5Jl>}Nj`IUYzHo46c4U(|i26AVBu{}-`H@`6n zz%B`L=h*;`%?r)E@hX@cXz>%9n0