I'm developing an APP and I'm using Kivy, I need to get a user input that's an int/float but I can't get the input as I don't know how to get it, I've read the documentation, went through numerous Stackoverflow and Reddit threads.
This is the code
from kivy.app import App
from kivy.uix.label import Label
import psutil
import os
from kivy.uix.textinput import TextInput
class BatteryPrototypeApp(App):
def build(self):
battery = psutil.sensors_battery()
plugged = battery.power_plugged
percent = str(battery.percent)
plugged = "Plugged In" if plugged else "Not Plugged In"
# limit = int(input("Limite: "))
label = Label(text=percent+'%')
limit = TextInput(text='Limit')
if battery.percent >= limit:
os.system("start Alarm.mp3")
return label
app = BatteryPrototypeApp()
app.run()