kivy

Kivy FileChooser doubleclick

扶醉桌前 提交于 2020-01-07 03:14:10
问题 Could somebody post a small working example of a kivy Filechooser with the following simple doubleclick function: doubleclicking on a file will print out the filename? 回答1: Here is an example of that. from kivy.app import App from kivy.uix.filechooser import FileChooserListView from kivy.uix.boxlayout import BoxLayout class MyFileChooser(FileChooserListView): def on_submit(*args): print(args[1][0]) class MyLayout(BoxLayout): def __init__(self,**kwargs): super(MyLayout,self).__init__(**kwargs)

NSException on import of matplotlib, kivy in OSX

邮差的信 提交于 2020-01-07 03:11:16
问题 I'm working on some kivy code that's working fine on windows 10, but crashes on osx sierra, I've isolated that the crash happens when I import kivy.core.window along side matplotlib: import matplotlib matplotlib.use("TkAgg") from matplotlib import pyplot as plt import kivy.core.window It also crashes without matplotlib.use("TkAgg") . This is just included to show that the issue isn`t fixed by this as other questions suggest. The output from the exception is: 2017-03-08 13:33:32.461 Python

How do i mask an image in kivy using python?

亡梦爱人 提交于 2020-01-06 21:41:10
问题 I'm trying to mask an image with a specific mask, but i can't seem to find a way. I've read the documentation and found this https://kivy.org/docs/api-kivy.graphics.stencil_instructions.html# which looks promising but the example is only in kivy language (which i don't use in my project) I've also found this https://groups.google.com/forum/#!topic/kivy-users/-XXe3F2JoSc but first example is's a bit confusing and second one uses StencilView which seems to be a different thing So an universal

Use Kivy app while excel file is being built

╄→尐↘猪︶ㄣ 提交于 2020-01-06 19:58:46
问题 So I am trying to create a Kivy app that allows a user to control and monitor various hardware components. Part of the code builds and continuously updates an Excel worksheet that imports temperature readings from the hardware's comm port, along with a time-stamp. I have been able to implement all of this so far, but I am unable to interact with the Kivy app while the Excel worksheet is being built/updated (i.e. while my hardware test is underway), and leaves me unable to use the app's

Kivy: How To Display 'Correct!' When Input Is Correct?

耗尽温柔 提交于 2020-01-06 08:13:28
问题 I'm trying to create a system that will show 'correct' when the input is correct. But I'm so confused about how classes and functions work even after watching tutorials and reading through documentations, as I'm new to Python and Kivy. This is my kv code so far <CorrectLayout> id: correctlayout Label: text: 'Gesture Correct!' background_normal:'bgpics/translateback.jpg' pos_hint:{"x":-0.15,"y":-.43} color: 1,1,0,1,1 font_size: '45sp' font_name: 'EraserRegular.ttf' Image: source: 'bgpics

Maximum recursion depth exceeded in kivy but only when packaging, not when developing the app in python

為{幸葍}努か 提交于 2020-01-06 05:18:18
问题 I am trying to pack an app that requires several imports, among those matplotlib.pyplot The kivy app (simplified, but still working) is: from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.lang import Builder import matplotlib.pyplot Builder.load_string(""" <MyWidget>: id: my_widget FileChooserIconView: id: filechooser on_selection: my_widget.selected(filechooser.selection) Image: id: image source: "" """) class MyWidget(BoxLayout): def selected(self,filename): self

Cannot get window to open in kivy [duplicate]

纵然是瞬间 提交于 2020-01-06 05:14:27
问题 This question already has answers here : Kivy not working (Error: Unable to find any valuable Window provider.) (4 answers) Closed last year . I am starting to use kivy for my game, so while following some tutorials online, the python shell returns these errors. [INFO] [Logger] Record log in C:\Users\chi_j\.kivy\logs\kivy_18-10-23_8.txt [INFO] [Kivy] v1.10.1 [INFO] [Python] v3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] [INFO] [Factory] 194 symbols loaded [INFO]

Kivy: understanding widget instances in apps

。_饼干妹妹 提交于 2020-01-05 09:08:47
问题 I'm still warming up to this Kivy stuff, hope you don't mind another question from me! I'm trying to understand scheduled events for some of my widgets. For the sake of context, I want to be able to move nodes onto edges, and have the edges 'snap to' the node. Here is my .kv file: <GraphInterface>: node: graph_node edge: graph_edge GraphNode: id: graph_node center: self.parent.center GraphEdge: id: graph_edge center: 200,200 <GraphNode>: size: 50, 50 canvas: Color: rgba: (root.r,1,1,1)

Kivy: understanding widget instances in apps

落爺英雄遲暮 提交于 2020-01-05 09:08:12
问题 I'm still warming up to this Kivy stuff, hope you don't mind another question from me! I'm trying to understand scheduled events for some of my widgets. For the sake of context, I want to be able to move nodes onto edges, and have the edges 'snap to' the node. Here is my .kv file: <GraphInterface>: node: graph_node edge: graph_edge GraphNode: id: graph_node center: self.parent.center GraphEdge: id: graph_edge center: 200,200 <GraphNode>: size: 50, 50 canvas: Color: rgba: (root.r,1,1,1)

Kivy OpenGL requirements feasible for deployment?

纵饮孤独 提交于 2020-01-05 08:24:29
问题 I'm currently in the process of finding a nice GUI framework for my new project - and Kivy looks quite good. There are many questions here (like this one) about Kivy requiring OpenGL >2.0 (not accepting 1.4) and problems arising from that. As I understood, it's the graphics drivers thing to provide a decent OpenGL version. I'm concerned what problems I'll have deploying my app to users having a certain configuration, that they will not be willing or able to have OpenGL >2.0 on their desktop.