diff --git a/piker/ui/__init__.py b/piker/ui/__init__.py index 941b7bb6..bc6e6ac9 100644 --- a/piker/ui/__init__.py +++ b/piker/ui/__init__.py @@ -1,7 +1,13 @@ """ -Stuff for you eyes. +Stuff for your eyes. """ import os +import sys + +# XXX clear all flags at import to avoid upsetting +# ol' kivy see: https://github.com/kivy/kivy/issues/4225 +# though this is likely a ``click`` problem +sys.argv[1:] = [] # use the trio async loop os.environ['KIVY_EVENTLOOP'] = 'trio' diff --git a/piker/ui/monitor.py b/piker/ui/monitor.py index 237f6432..7404a750 100644 --- a/piker/ui/monitor.py +++ b/piker/ui/monitor.py @@ -252,8 +252,7 @@ async def _async_main( quotes ) try: - # Trio-kivy entry point. - await async_runTouchApp(widgets['root']) # run kivy + await async_runTouchApp(widgets['root']) finally: # cancel remote data feed task await quote_gen.aclose() diff --git a/piker/ui/option_chain.py b/piker/ui/option_chain.py index 4267ac01..4ebe9dac 100644 --- a/piker/ui/option_chain.py +++ b/piker/ui/option_chain.py @@ -498,8 +498,7 @@ async def _async_main( ) async with chain.open_rt_display(nursery, symbol): try: - # trio-kivy entry point. - await async_runTouchApp(chain.widgets['root']) # run kivy + await async_runTouchApp(chain.widgets['root']) finally: if chain._quote_gen: await chain._quote_gen.aclose()