from kivy.app import App
from kivy.lang import Builder
from kivy.uix.button import Button
from kivy.clock import Clock
from kivy.properties import StringProperty
from kivy.uix.label import Label
from time import strftime
kv = """
<Home@Screen>:
BoxLayout:
orientation: 'vertical'
MyClock:
font_size: 50
text: self.current_time
Button:
background_color: [128,0,0,.6]
text: 'Set Alarm'
on_press: app.root.ids.sm.current = 'alarm_page'
<AlarmPage@Screen>:
Button:
text: 'Put alarms on this page'
on_release: app.root.ids.sm.current = 'home_page'
BoxLayout:
ScreenManager:
id: sm
Home:
name: 'home_page'
AlarmPage:
name: 'alarm_page'
"""
class MyClock(Label):
current_time = StringProperty(strftime("%I:%M:%S %p"))
def __init__(self, **kwargs):
Clock.schedule_interval(self.update_time, 1)
super().__init__(**kwargs)
def update_time(self, dt):
self.current_time = strftime("%I:%M:%S %p")
class MainApp(App):
def build(self):
return Builder.load_string(kv)
if __name__ == "__main__":
MainApp().run()
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causessdl2 - ImportError: DLL load failed: The specified module could not be found. File "C:\Users\Owner\Anaconda3\envs\Aggro-Alarm\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib fromlist=[modulename], level=0) File "C:\Users\Owner\Anaconda3\envs\Aggro-Alarm\lib\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module> from kivy.core.window._window_sdl2 import _WindowSDL2Storage
[CRITICAL] [App ] Unable to get a Window, abort.
On Apr 19, 2020, at 1:02 PM, Abraham Francisco <fran...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c89ff5ed-808c-4989-8592-8b09cd8e1e63%40googlegroups.com.
On the setting screen in Pycharm, make sure you have selected the proper project Interpreter.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/9817aafc-394d-4465-b06b-7b16154803ee%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.