Questions tagged as 'python-kivy'

1
answer

What is the purpose of if __name__ == '__main__': if kivy can run the application without this line of code? [duplicate]

In the kivy documentation it shows that pro app works is needed if __name__ == '__main__': MyApp().run() But I try to remove the if condition; and the app performed anyway; Somebody explain to me why, please!     
asked by 02.03.2018 / 15:30
4
answers

How do I capture each key typed in python

I'm trying to make a program that captures the keys typed on the pc, so that I can access them later. I do not know where to start. I do not know if it uses sqlite3 (database), in google I researched, but some explanations are zero.     
asked by 05.09.2018 / 06:03
1
answer

Black screen when running a program with Kivy

I do not understand why when I run the following code the screen appears only black. Can someone give me a hand? from kivy.app import App from kivy.uix.label import Label from kivy.uix.button import Button from kivy.uix.floatlayout import Floa...
asked by 04.10.2018 / 17:54
1
answer

I can not return the values assigned to the variables

I'm a layman and I'm programming and starting a python program to use as a tool in a game well, the code so far is this: def tempo (temp): total=temp*quant dias=total//(24*60*60) var1=total-(dias*(24*60*60)) horas=var1//(60*60) var2=var1-(hora...
asked by 23.01.2018 / 21:18
1
answer

Indent error

I'm trying to create a TextInput in Kivy and set its dimensions, except that whenever it puts its error dimensions:    invalid indentation, must be a multiple of 4 spaces. I still do not understand why you are giving this error....
asked by 20.12.2018 / 19:06
0
answers

How do I add and remove wigdets dynamically?

import kivy kivy.require('1.10.1') from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button class Tela-1 (BoxLayout): def on_press_bt(self): janela.root_window.remove_wigdet(janela....
asked by 25.08.2018 / 16:45
0
answers

Kivy using raspberry pi 3

I'm using the HDMI output of Raspberry Pi 3 . Using a Python code that opens a Kivy window, this window fills the entire screen and overrides everything else (open windows, mouse pointer ). ..). Apparently it ( rasp ) responds to the comman...
asked by 19.09.2018 / 13:53
0
answers

Change screen by python file in kivy

I need to change the screen inside the .py file, I can not do that for .kv because I have to use ButtonBehavior and it does not work on .kv . from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.u...
asked by 12.07.2018 / 07:44
2
answers

Error in basic code in Kivy (Python)

I made a very simple code using Kivy, but of the error that is showing in the image below: The code is as follows: import kivy kivy.require('1.0.6') from kivy.app import App from kivy.uix.button import Button class MyApp(App): def bui...
asked by 04.11.2017 / 17:20
2
answers

Is it a good idea to use JSON as a database?

I'm doing a mobile app project. Using Python and Kivy. My project has three main classes to be saved in a database (it's an application for ticket sales): Tickets, Events and Users. Searching, I have seen that JSON at the beginning is quite e...
asked by 23.08.2018 / 00:45