FAQ Database Discussion Community


How to position BoxLayout to top of screen

android,python,kivy
I have a ActionBar that is nested inside a BoxLayout widget. I'd like the ActionBar to appear at the very top of the screen. Currently, I'm only able to get it to appear at the very bottom. Here is a screenshot: Here is my main.py: from kivy.app import App from...

Analogous Properties in Kivy

python,kivy
I was wondering if there is such a way to duplicate the wrap_content XML property in Kivy. --------------------------------------------------------------- | | | | | REALLY LARGE TITLE | | | | Play | | | | Scores | | | | About | | | --------------------------------------------------------------- Basically, I can't use a...

Scrollview not scrolling button

python,scrollview,kivy
I would like to create a scrollable Floatlayout with dynamically created buttons (kind of paint where I can scroll the drawing board). Unfortunately, the code that I come out doesn't work and the buttons don't move while scrolling the FloatLayout. How can I attach the button to the FloatLayout? import...

How to use bufferedreader.readLine in kivy?

android,python,kivy
Im using kivy + bluetooth socket. while I'm receiving data from bluetooth, the bufferedreader.read() method works. But bufferedreader.readLine() method won't work.. def change_data(self): Logger.info('Im in the change_data!!') self.data = 'change_data' paired_devices = BluetoothAdapter.getDefaultAdapter().getBondedDevices().toArray() if BluetoothAdapter.isEnabled() == False: Logger.info('bluetooth not turned on') PythonActivity.mActivity.startActivityForResult(Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE), 200) else: pass for device in...

Using various Python packages within a Kivy program

python,packages,kivy
Is it possible to use any Python package within a Kivy program, and ultimately running it on an android device? for example - can I use the package "xlrd" or "googlemaps" on Kivy? If the answer is positive, How do I do it? normally I get an error message that...

Buildozer: manually include an external API

android,python,kivy,buildozer
I'd like to include an SDK library into the build that does not exist in PIP, or any public place on the Internet. I've read that this can be done manually. I put the SDK library in the root of my Kivy project. The development console finds this import just...

Kivy Text Input for Arabic Text

python,kivy,arabic,right-to-left
I'm trying to use Kivy's text input for Arabic text. I have an Arabic font set up with my text input but when I type into the input (in Arabic) I just get Arabic letters appearing from left to right (and they're not connected as Arabic letters should be when...

How to change opacity when pressing buttons on kivy

python,kivy
how does one change the opacity of the randomly thrown image when the buttons are clicked? (using kivy). from random import randint from random import random from kivy.app import App from kivy.uix.button import Button from kivy.uix.widget import Widget from kivy.graphics import Color, Line, Rectangle from kivy.uix.filechooser import FileChooserListView, FileChooserIconView from...

Updating Kivy GUI using clock object?

python,user-interface,kivy
I asked in a previous question about updating a popup to say something like 'running' after a run button in the popup has been pressed. The issue is that the gui doesn't actually update until after the process has finished running, by which point updating the popup is pointless. I...

Adding my Widget to Kivy App __init__ leads to blank screen and Warning

python,pycharm,kivy
I started with the Kivy Crash Course a few days ago and wanted to write a memory game. My App Class looks like that: class MemoryApp(App): def build(self): self.mgw = MemoryGameWidget() return self.mgw This code works with my .kv file. I always check my code with Pycharm Code Inspect. Pycharm...

Kivy Widget does not accepts properties and commands

python,widget,kivy
I wanted to make my first Kivy game, with enemies which run over the screen and the player is supposed to kill the enemies by clicking on them. I created an Enemy class which is part of a level class, both are subclasses of the class Widget. I made a...

Kivy GUI with autobahn WAMP

python,kivy,autobahn
And I am trying to combine between kivy application and autobahn wamp. For start I want to make the most basic app which will show a label and change it when a publish command will come. This is my basic kivy App: class MyFrontendComponent(App): def build(self): root = self.setup_gui() return...

Python & Kivy Attribute Error:

python-2.7,kivy,filechooser
I am trying to make a code of file chooser using kivy & python on client & server base...Rest part of the code works nice but given part gives attribute error as "'ClientScreen' has no attribute 'openfile_from_filechooser'" In which part i am making mistake...i have search that how can i...

how to get kivy run in a virtual box

python-3.x,virtualbox,kivy
Hej I try to play a litte around with Ubuntu 14 LTS 64Bit at Oracle VM on Windows 7. Installing kivy for python3 works fine. BUT when I want to create the App in python I got following error: [[1;32mINFO[0m ] [Logger ] Record log in /home/stj/.kivy/logs/kivy_15-06-04_0.txt [[1;32mINFO[0m ] [Kivy...

Kivy: How to control a realtime graph with an action bar

python,graph,kivy
I have a graph that updates and add points in realtime, but I want to be able to control it through an ActionBar(i.e play, pause, stop,etc.). So far, no matter what I try, it has not worked. Do I need to convert the graph into some kind of animation? Below...

how to make self updating clock label in kivy?

python,label,kivy,clock
I want to make a Label which acts as a clock and gets updated every second just as in making-a-clock-in-kivy link but in the status bar. I want the label in status.kv file with id: _tnd to act as a clock. The print statement in the update function (test_gui.py) does...

Kivy Builder - Dynamic Button on_press

python,kivy
I have been creating an application using kivy. Within my app, I have a button that reads from a directory, and adds a button for each file in the directory, to a popup widget. The code to generate the buttons works nicely, and no issues there. My issue is when...

How to center a kivy widget relative to an other in a BoxLayout?

python,user-interface,kivy
Hej I am looking for a easy way to center a TextInput vertical. The pseudo kv code looks like this: ParamBox: orientation: 'horizontal' padding: 5 spaceing: 5 Button: text: 'hello' size_hint_x: 0.25 Slider: size_hint_x: 0.5 TextInput: size_hint_x: 0.25 size_hint_y: None height: sp(32) It doesn't look good, if the TextInput is...

Reuse custom Widget in Kivy app

python,frameworks,widget,kivy
I have a simple kivy app with the kv file associated as below, and I want to reuse my custom widget (included his appearance) in another kivy app. This is the widget to reuse: class MyButton(Button): pass class MyComposit(Widget): button1 = ObjectProperty(None) lab = ObjectProperty(None) class MyApp(App): def build(self): comp...

Kivy app (on android) crashes when attempting to use google directions api

urllib2,kivy,urlrequest,buildozer
I new to Kivy (and relatively new to Python) and I am having a problem getting UrlRequests to work. In particular, I am trying to use the google directions api in an App for android. First of all, the code works (completely) when I run the main.py file through python....

Kivy VideoPlayer fullscreen, loop, and hide controls

python,kivy
I'm just starting out with Kivy, so please point out if I'm doing something wrong.. I'm trying to work with the video player. Namely, I can't seem to get it to recognize any "options", and I'd really like a way to hide the controls (to prevent the user from stopping/pausing/changing...

How to reset widget in Kivy

android,python,kivy
I have a very simple application having one button and one label. Label have value 0 initially. On each button press, label increase by 1. When label becomes 3, i show a popup with a "play again" button. Now, i want to reset label to 0. My Attempt: #!/usr/bin/kivy import...

What is the correct way to initialize a Kivy Screen?

kivy
I am using Kivy with a .kv file. This is what my Python code looks like: class WelconeScreen(Screen): def __init__(self, **kwargs): self.name='home' super(Screen,self).__init__(**kwargs) class QuestionScreen(Screen): def __init__(self, **kwargs): self.name='question' super(Screen,self).__init__(**kwargs) class RootScreen(ScreenManager): pass class TestApp(App): def build(self): return RootScreen() if __name__ == '__main__': appVar = TestApp() TestApp().run() And this is...

screen switch does not happen on button click in kivy

python,user-interface,kivy
I am new to kivy. I want to switch to another screen (Signup screen) when 'signup' button is clicked on the main screen (Login screen). here is the python code: import kivy kivy.require('1.9.0') import ConfigParser from kivy.app import App from kivy.core.window import Window from kivy.uix.screenmanager import Screen, ScreenManager Window.size =...

How to create a Package with Python-for-Android in windows?

android,python,git,kivy
I am using Kivy framework. I want to create a package for android using the python-for-android project in windows 7. I read this link http://kivy.org/docs/guide/packaging-android.html. The Buildozer as I read automates the entire build process but it currently works only in Linux. The other method given here uses git which...

Why am I getting a (NameError: name 'self' is not defined ) here using Kivy for Python?

python,python-2.7,kivy,self,nameerror
I'm making a game and I'm working on the screen switching. I want the screen to switch when I press the "play" button but I get a NameError instead. Here's the code: class menu_screen(Screen): def __init__(self, **kwargs): super (menu_screen,self).__init__(**kwargs) menu_layout = FloatLayout logo_label = Label(text = "GAME", size_hint=(.6, .2),pos_hint={'x':.2, 'y':.65})...

kivy: press button -> change color of a label

python,canvas,colors,label,kivy
in the kv File I added a Label and changed its color: Label: id: ampel_rot canvas.before: Color: rgba: 1, 0, 0, 0.3 Ellipse: size: self.size My aim is to create some kind of a traffic light, so that the user of the GUI has some kind of visual feedback over...

How to set event handler functions in kivy templates?

python,kivy
Hej, I want to create an TextInput or Label which is alligned to the center. A method is to create an AnchorLayout and attach it to it. Doing that to all labels can be an nasty coding task. Thats why I want to create a Template doing it for me....

Kivy - using .kv

python,kivy
I am trying to transfer my widget creation to .kv instead of in my main.py. How can I still reference my on_press commands? painter is another child widget and contains the function I want to call, however I am unsure how I can reference painter.acceptshape from .kv. class TestingApp(App): def...

'NoneType' object has no attribute 'generate_ticket'

android,python,kivy
I'm not sure why I'm getting this error. I'm fairly new to kivy and the error might be obvious to those more experience with kivy so please impart your knowledge on to me. I'm assuming that I'm not using the function call properly in the kv language or that I...

AttributeError while Implementing a timer

python,kivy
I am trying to Implement a timer in my Object game, But it constantly gives me: File "/home/nabeel/Desktop/game/ProjectGame/main.py", line 71, in call self.time_number = str(22) AttributeError: 'float' object has no attribute 'time_number' I can not understand as to why is this happening? The .py file __version__ = "1.0" from kivy.app...

Kivy: 'NoneType' object has no attribute 'bind'

python,widget,kivy,attributeerror
I was testing out the ActionBar widget of Kivy, here is my program - from kivy.app import App from kivy.lang import Builder from kivy.uix.boxlayout import BoxLayout Builder.load_string(''' <RootWidget>: ActionBar: pos_hint: {'top':1} ActionView: ActionButton: text: "Button" ''') class RootWidget(BoxLayout): pass class MainApp(App): def build(self): return RootWidget() if __name__ == "__main__": MainApp().run()...

Adding custom view classes to Screen Manager

python,kivy
I'm simply trying to make some example code I found which dynamically adds widgets to a view incorporate with a Screen Manager, and I cannot get it to work. I found this example Associating Screens with GridLayout classes in kivy and as far as I know I've implemented the strategy...

How to use several splitters in Kivy?

kivy,splitter
I'd like to use two splitters in a single screen, so that the user can have either one of the 3 parts to fill the whole screen (but leaving a bit for the splitters to be shown). I've tried doing it (see code below), but when I shrink part 3...

getting error mno-fused-madd installing kivy in virtualenv over fish shell

xcode5,clang,llvm,osx-mavericks,kivy
Hi I am getting the error saying clang: error: unknown argument: '-mno-fused-madd' when I am trying to install kivy in virtualenv named kivyprogramming. cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -Wno-error=unused-command-line-argument-hard-error-in-future -pipe...

OpenGL Module using kivy

android,python,opengl-es,kivy
I am trying to follow this tutorial: http://digitaloctave.co.uk/pages/kivy/kivy-opengl-tut03.htm but I think it is a little old, I cant get "from opengl_widget import OpenglWidget" working, it say the module doesn't exist. I think the OpenGL module is to use the " OpenglWidget: width: 200 height: 200" in the .kv file. I...

Scale python kivy line

python,kivy
I am trying to plot various line segments using kivy. The line appears really small (at one end of the screen) and I would like to scale it up. Ideally, I would like to specify coordinates from the center of screen and specify width and height so that the line...

Kivy class in .py and .kv interaction 2

python,class,kivy
Follow up from Kivy class in .py and .kv interaction , but more complex. Here is the full code of what I'm writing: The data/screens/learnkanji_want.kv has how I want the code to be, but I don't fully understand how the class KanjiOriginScreen() plays it's role in screen management. data/screens/learnkanji.kv works...

Update a line segment in python kivy after a fixed time

python,kivy
I am trying to create a line and update is after a fixed interval of time (say 5 seconds). I wrote the code below but it does not update the line. Can anyone help me figure out who to do it? from kivy.app import App from kivy.uix.gridlayout import GridLayout from...

Why and by whom is this method called in kivy

python,kivy
I make my first steps with kivy and try to plot functions entered in a TextInput via matplotlib or pygal. Both works fine as long as I save the images on the disk. To speed up the program I don't want the image write to and read from the disk....

Buildozer failed to execute the last command

android,python,python-2.7,kivy
while I was trying to build,push and automatically run the apk on my device using buildozer android debug deploy run it shows these errors: # Check configuration tokens # Ensure build layout # Check configuration tokens # Preparing build # Check requirements for android # Install platform # Apache ANT...

Kivy images without kv language

python,kivy
I wanted to make a small Programm, in order to learn how to add images without using the kv language, but it did not worked. Here is the code: from kivy.app import App from kivy.uix.widget import Widget from kivy.graphics import Color, Rectangle from kivy.core.window import Window from kivy.lang import Builder...

Why adding height to floatLayout will make it start adding following blocks from the bottom of the screen?

python,python-2.7,python-3.x,kivy
I Have the following code in kivy and I'm wondering why the Float Layout started adding it's children from the bottom up, how can I make it go top down again? from kivy.app import App from kivy.lang import Builder from kivy.base import runTouchApp from kivy.uix.boxlayout import BoxLayout from kivy.uix.floatlayout import...

Python Kivy Attribute Error

python,kivy
I installed Kivy from ppa:kivy-team/kivy but got AttributeError: 'module' object has no attribute 'instancemethod' I reinstalled it but still the same error appears. I have tried ppa:kivy-team/kivy-daily and from the official ubuntu repositories but the error occurs in all. My code is the Hello World application from here. My filename...

Kivy is not compitable with Cython?

python,install,cython,kivy
I decided to choose kivy to to help me design my gui applications, but I am facing this problem; I installed cython 0.22 and everytime I try to install kivy I get this (with a lot of other lines): ImportError: Incompatible Cython Version Can anyone suggest a way to solve...

Kivy Recycleview. How to use it?

kivy
I want to know about Kivy Recycle view. How to use it? I want to see a an answer like widget description in documentation. I know in github there is an short description. This is not enough. So can someone explain how to use the Recycleview widget and what are...

Kivy Repeating Actions

python,kivy
I've been playing around kivy's touch inputs, however I've noticed that my functions get called multiple times despite a button being pushed only once. def on_touch_down(self,touch): with self.canvas: if self.clearcanvas: self.canvas.clear() Color(*self.color) touch.ud['line'] = Line(points=(touch.x, touch.y),width =3) self.actions() return True def on_touch_move(self, touch): if self.clearcanvas: touch.ud['line'].points += [touch.x, touch.y] self.linecoord...

Kivy Adding Widget to a screen

python,kivy
This seems to be a silly question. But I have a widget that I want to add to a screen called GameScreen. This is my Python code: class WelcomeScreen(Screen): pass class BasicScreen(Screen): pass class GameScreen(Screen): parent = Widget() game = ShootingGame() parent.add_widget(game) Clock.schedule_interval(game.update, 1.0 / 60.0) # return parent sm...

How to change popup color in kivy

python,kivy
In Kivy, Popup appears in grey color, what should be changed to make it red color My popup code: class MyPopup(Popup): def show_popup(self): content = BoxLayout(orientation="vertical") content.add_widget(Label(text="Game Over", font_size=20)) mybutton_cancel = Button(text="Cancel", size_hint_y=None) content.add_widget(mybutton_cancel) mypopup = Popup(content = content, title = "oops", auto_dismiss = False, size_hint = (.5, .5)) mybutton_cancel.bind(on_release=mypopup.dismiss)...

How does kivy response to a click event?

python,kivy
I am trying to develop a Turing machine simulator with kivy and python and I got the basic GUI setup. But when I click the buttons in top bar and side bar the on_touch_down() function is sort of overload the on_press() function. How can I fix that? So what I...

buildozer can't download webbrowser

android,python,kivy
I wanted to compile this, perfectly working, Program with buildozer: import webbrowser from kivy.app import App class FAN(App): def build(self): webbrowser.open_new_tab('http://www.freies-aktivisten-netzwerk.de/wordpress/') if __name__ == '__main__': FAN().run() FAN().stop()` Despite the fact, that I wrote the requirements in Buildozer, it did not work, and I got this error: Downloading/unpacking random Could not...

Kivy variable background widget

android,python,kivy
I recently started using kivy, and I have a question about the change of the background. I need to create multiple widgets with different backgrounds. I'm doing it wrong, but I did not get: Kv file: <[email protected]>: canvas.before: Color: rgb: self.rgb Rectangle: pos: self.pos size: self.size main.py widget = Widget()...

How can I control my Kivy scrollview by dragging the sliders?

python,user-interface,scrollview,kivy
I am new to Kivy and while I love the touch interface, I want my code to work well on non-touchscreen computers as well. Right now I have a scrollview with a gridlayout in it that is larger than the visible area. I can very easily move my view by...

Can't figure out TypeError: __init__() takes exactly 3 arguments (2 given)

python,twisted,kivy
I am working on a multi clients/ server chat app that can write input from one client to multi clients. For the client side it's working well, yet for the server side I want to add a part where it can print out the input from the clients on its...

Packaging Kivy Python applications on OSX Yosemite not working

python,osx,kivy,pyinstaller
I'm trying to package a Kivy/Python application on Yosemite with pyinstaller (OSX 10.10, Kivy 1.9, pyinstaller 2.1) and not having much success, via the Kivy OSX package how-to. After troubleshooting my PYTHONPATH to make sure it included Kivy and all the dependencies, I tried just building their demo touchtracer app,...

PushMatrix and PopMatrix in Kivy

python,kivy
I want the second line to be original color (white). I know I could write 'color: 1,1,1,1' but I would like to use PushMatrix and PopMatrix but it does not work. Where to place PushMatrix and PopMatrix? Here my sample code: import kivy kivy.require('1.9.0') from kivy.app import App from kivy.uix.gridlayout...

How to give google receive permission in kivy buildozer?

android,kivy
How can I set this permission = com google android c2dm permission receive

How can I use python to display nested lists in separate lines in kv label?

python,list,nested,label,kivy
I have a list of lists, where there are 3 items per inner list (as in the example below). data = [ ["abe","abo","aba"], ["ade","acd","acr"], ["adr","adw","adz"], ["akw","aky","akz"], ["bad","bbf","btr"], ["bst","bsv","bus"] ] In the kv file, I have set a Label (inside a ScrollView) to display information from the list when the user...

Kivy - Create new widget and set its position and size

python,python-3.x,widget,kivy,custom-widgets
got a little problem. So Iam trying to create my own widget, and i have succeed, only except for setting its size and position right(to be same as its parrent). class Story(App): def build(self): return MyWidgets().init() The app has GridLayout as a holder, into which i want to pass the...

How to import a new Vertex Instruction (Line) in the Kivy Language?

python,kivy
I want that by default all my Line instances have a width of 2. Instead of adding width: 2 each time I create a new instance, I am trying to create a new class (MyLine): class MyLine (Line): def __init__(self, **kwargs): kwargs['width'] = kwargs.get('width') or 2.0 Line.__init__(self, **kwargs) This actually...

GPS is not implemented for your platform - Kivy / Plyer / PyCharm

android,python,gps,pycharm,kivy
This is the example app given included in plyer. I want to see how it works because I'll use it in my project. I want to use the GPS function. But it says that it is not implemented for my platform :( How to make it work? Thanks! ...

Python: importing the android module

android,python,kivy
I was following this tutorial on how to create an Android service using kivy, and about half way down the page under the heading 'Starting the Service', the code example has the line from android import AndroidService. I see that I don't have the android module installed and I can't...

How to remove “CannotImport” error in Python-kivy?

python,ubuntu-14.04,kivy,linuxmint
I am using linux mint, i have installed python-kivy using the instructions http://kivy.org/docs/installation/installation-linux.html#ubuntu-11-10-or-newer but after running first program there is a error. I am attaching both coding and error screenshot. Please help me out. from kivy.app import App class TutorialApp(App): pass if __name__=="__main__": TutorialApp().run() ...

Get value from kivy text input in kv during build

python,kivy
I have three questions/problems: given below configuration of app/app kv file why do I have to call self.build() in ButtonsFactory class. If i remove it, i get black screen, probably because there is no root element in kv file, yet if i tried making MainView root element i end up...

Update label's text when pressing a button in Kivy for Python

python,python-2.7,button,label,kivy
Here is my code: I want to make a game where the main_label changes text when you press a button but I've looked everywhere for a week and still don't understand how to do it. I looked on Kivy's website but I don't understand. As you can see I'm new...

Python: How to create a simple frame in Kivy?

python,mobile,kivy
How can I create a simple frame in Kivy (Python for mobile), which will include a simple TextBox ? Thanks guys...

Kivy class in .py and .kv interaction

python,class,kivy
I'm not fully grasping how classes in a python file and the kivy language interact. I'm currently modifying the Showcase example of Kivy to increase my understanding. File structure main.py showcase.kv data/screens/test.kv main.py class Testy(BoxLayout): ttext = 'Bla' #other code class ShowcaseScreen(Screen): fullscreen = BooleanProperty(False) def add_widget(self, *args): if 'content'...

How to access id/widget of different class from a kivy file (.kv)?

python,events,button,widget,kivy
What I want to know? If button with id: button_b (Get_Boys class) is released, then Label with id: label_g (Get_Girls class) must change. If Button with id: button_b (Get_Boys class) is pressed, then Label with id: root_lbl (Get_People class) must change. If Button with id: root_btn (Get_People class) is released,...

How to remove kivy loading section?

android,python,kivy
When running a kivy app, it shows kivy icon and string "loading". If its possible, I wanna remove it or change the icon. Can you tell me how to remove it?...

Python - Does Kivy implements activities in the Android apps?

android,python,kivy
As we all know, when developing an Android app in native Java, we use activities. I was wondering that, in developing Android apps in Python(with Kivy), does Kivy implements activities for the apps in itself or not? because I don't see any activity implementation on the sample codes. If it...

Change button text value for on_press event in Kivy

kivy
My application has a single button with text value as '2'. I want to change the text value to 100 on on_press event My attempt: #!/usr/bin/kivy import kivy kivy.require('1.7.2') from random import random from random import choice from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import ScreenManager, Screen...

How to display game on the screen?

python,kivy
I'm trying to make an kivy app with starting menu, but I can't display my Pong Game on the second screen. How should I refer to the game to make it visible? I tried and searched but can't find anything. I'm 100% sure that PongGame work corectly, I just can't...

Kivy Python very basic Binding of Label Text

python,binding,label,kivy
I know this might be a very basic question, but after spending hours wrapping my head around it I still can't figure it out. I basically just want to bind the text of a label to a variable in the python code. lets call it value. however it should get...

How to print button text value on console in Kivy

kivy
My app just have one button and its text is a random number from 1 to 9. I want to print the button text on console on on_press. Actually, i have minimized my problem, i want to compare the value with a variable, if button.text=5, do something else do_something_else. My...

How to use time sleep in Kivy

kivy
My app just have 1 button. I want to change its color on on_press event and then wait for 5 seconds and then display a popup. My Attempt: #!/usr/bin/kivy import kivy kivy.require('1.7.2') from random import random from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import ScreenManager, Screen from...

How to move from one class to another in kivy

python-2.7,kivy
I am trying to make an android application...I am trying to switch from menu to server or client according to user input...but i am not able to switch from one class to another...main thing which pissed me off is that print statement inside ServerScreen is working but other part is...

How to use random with button in Kivy

kivy
I just want to have 2 buttons in my KIVY APP. One with text "Hello" and other having a random number from 0-9. My code #!/usr/bin/kivy import kivy kivy.require('1.7.2') from random import random from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import ScreenManager, Screen from kivy.uix.gridlayout import GridLayout...

Kivy and matplotlib?

python-2.7,matplotlib,kivy
I just wanted to know if matplotlib is compatible with kivy 1.9.0, and how I do I go about implementing it if it's possible? If it's isn't supported, does kivy have something very similar to it? I want to able use this particular code from one my programs in my...

No module named OpenSSL in kivy app

python,openssl,kivy,autobahn
I have a kivy app which actually based on this example . In my desktop it works perfectly but when I build it whit buildozer and run it in my android device i get this error - ImportError: No module named OpenSSL Here is my buildozer requirements section: # comma...

Kivy: Turning an App into a widget

python,widget,kivy
I have built a Kivy GUI using the 'App' class that is designed to load a file using a file chooser and make it into a list. I have now learned that my whole chunk of code needs to be converted to a widget so that it can be integrated...

How to fill canvas with an image in kivy?

python,kivy
how would I fill the entire rectangle with my image so it fits the whole screen as background? from random import random from kivy.app import App from kivy.uix.button import Button from kivy.uix.widget import Widget from kivy.graphics import Color, Line, Rectangle from kivy.uix.filechooser import FileChooserListView, FileChooserIconView from kivy.uix.floatlayout import FloatLayout from...

Absolute Colors in Kivy

python,kivy
I am a aware that Kivy uses tinted colors such that a widget will be colored according to the color of its parent widget. Is there a way I can circumvent this nuance such that I can supply an RGBA value to the child without having to change the parent?

How to allow user to choose file as background image in kivy?

python,kivy
Or, how to do so using python, give it an ID, and set it as background image in kv language? I would like to be able to draw on top of an image instead of a black screen, which I am doing here: edited new problem: upload button does not...

Print and clear output on screen with Kivy

python,kivy
I'm trying to print some words on screen with kivy. What I'm looking for is print first word then sleep 2 seconds then clear first word and print second word What I'm currently doing: from kivy.app import App from kivy.uix.label import Label from kivy.uix.gridlayout import GridLayout from random import choice...

Some weird error using Kivy 1.9.1

python,virtual-machine,ubuntu-14.04,kivy,eclipse-luna
I'm trying to use some my python code from a class project for an Kivy app just for practice. I know the code works perfectly fine whether I run in it simply in IDLE or as an IPython notebook, but I'm encountering some weird error when I run the code...

how to make kivy widgets make a pause

android,python,python-2.7,kivy
I wanted to make a small program with two widgets to learn some things about game development with kivy. One Widget is supposed to run around the screen randomly, the otherone stands still. Now I wanted to find a way to implement a "pause button" wich is supposed to create...

Kivy: Reduce extra spacing between widgets

android,python,kivy
I have a Kivy app that uses a GridLayout with two rows. The first row contains a dropdown button with a list of items. The second row contains a BoxLayout with two labels. I noticed that there is a lot of space between these two widgets (the dropdown and the...

Having the Error “ImportError: No module named setupconfig” with kivy

python,kivy,python-import
Trying to run the script in the question: Kivy Text Input for Arabic Text. from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.uix.textinput import TextInput class EditorApp(App): def build(self): f = FloatLayout() textinput = TextInput(text='Hello world', font_name='DroidKufi-Regular.ttf') # import pdb; pdb.set_trace() f.add_widget(textinput) return f if __name__ == '__main__': EditorApp().run()...

Kivy 1.8 and Cython 0.21.2

cython,kivy,buildozer
Using Buildozer I get 12 times: #error Do not use this file, it is the result of a failed Cython compilation. And eventually: Command failed: ./distribute.sh -m "kivy" -d "myapp" According to the Kivy docs, I use Cython 0.21.2. See the full log. Any help would be very much appreciated!...

How to pass dictionary values to callback function?

python,kivy
I have a dict of titles with values representing 3 letter abbreviations. I have a list of buttons with the titles, and I need the on_click to return the abbreviation. What I have now returns the titles (button text) but I can't figure out how to pass along the whole...

How to change background color of button on press in kivy?

kivy
My app has a single button with a default background color. I just want to change its background color to another color on on_press event. You may consider it similar to visited and non-visited hyperlinks of html ie when a linked is clicked, it changes its color. My attempt: #!/usr/bin/kivy...

Trouble updating text Label

kivy,python-2.x
I am trying to Implement a clock, but for now I am having trouble updating the label. I tried using a print statement to see weather the function is being called, and it sure is. But the label isn't being updated? Why is this happening? from kivy.app import App from...

can't run “hello world” python code in kivy launcher for android

android,python,kivy
I'm trying to run this code from kivy.org in kivy launcher on my nexus 5. I've made a folder in kivy folder and "android.txt" file. Here's main.py: import kivy kivy.require('1.9.0') from kivy.app import App from kivy.uix.label import Label class TestApp(App): def build(self): return Label(text='Hello World') if __name__ == '__main__': TestApp().run()...

Why can't I seem to put a Label into a StackLayout (or other Layouts) within a Kivy-App?

python,kivy
In theory, putting a Kivy-Label into a Stack Layout (or into some other layout) should be the easiest and most common thing - but it is currently plunging me into despair. The following syntax displays a plain single-button app (under Kivy 1.8 or 1.9, Win 7) until I uncomment the...

How to fix aspect ratio of a kivy game?

python,layout,resize,kivy,aspect-ratio
I've started playing with Kivy, but I'm rather new to all this and am already struggling. I'm trying to make a board game - I want the window to be resizeable, but I don't want resizing the window to mess up the aspect ratio of the game (so in other...

Kivy - OSError, Still Apps Run Successfully?

error-handling,kivy
Every time I run a Kivy app I see OSError (see it in last line of my given example). Even though my app runs successfully. What could be the cause of this error? Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File...

KeyError: 'ANDROID_APP_PATH'

android,python,kivy,qpython
I've been programming some Kivy/Python apps on my Motorola Moto G mobile phone. I've got a few handy little apps, that have been working OK for a few months. Today, I launched one of the apps - through the QPython interface, and it didn't work. So, I tried another of...

Retrieve Image from sqlite3 database and directly display on kivy window

android,python,database,sqlite3,kivy
What I am getting from this code? Image is retrieved from the database, then created in the same folder from this code with open(self.filename, 'wb') as output_file: output_file.write(self.ablob) then only I can get access to that image. I cannot directly get the image from the database and display it. What...

How to set the images of a Switch in Kivy?

python,widget,kivy
Hej I like to customize the On/Off Switch in kivy. For a Button I know how to do it. The kv code looks like this: Button: background_normal: 'gfx/offButton.png' background_down: 'gfx/onButton.png' Now I whant to know it for the Switch widget. Any Ideas?...

Increase kivy scrollview window size with increase widget entries

python,scrollview,kivy
I have the following code that produces a scrollview of row entries. import ... class DigestApp(App): def build(self): s = ScrollView() b = BoxLayout(orientation='vertical', size_hint=[1, 5]) header = BoxLayout(orientation='horizontal') header1 = Label(text='#', size_hint=[.35, 1]) header2 = Label(text='header', size_hint=[6, 1]) checkAll = BoxLayout(orientation='horizontal') header3 = Label(text='Check All') header4 = CheckBox() checkAll.add_widget(header3)...