kivy

How to fix “No module named 'kivy._clock'” error in ubuntu?

匆匆过客 提交于 2020-01-15 01:40:06
问题 I'm trying to install "kivy" (GUI lib) with Ubuntu 16.04 for Python 3.6 I tried doing the steps in the kivy official website (https://kivy.org/doc/stable/installation/installation-linux.html) I entered in the terminal: sudo add-apt-repository ppa:kivy-team/kivy sudo apt-get update sudo apt-get install python3-kivy And when I tried to import: from kivy.app import App I get the error: ModuleNotFoundError: No module name 'kivy._clock' 回答1: Try this in terminal: Make sure you have pip installed

how to pass more then one parameter in pop up box when click on row

佐手、 提交于 2020-01-14 06:10:32
问题 user.py import kivy kivy.require('1.9.0') # replace with your current kivy version ! import sqlite3 as lite from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.properties import BooleanProperty, ListProperty, StringProperty, ObjectProperty,NumericProperty from kivy.lang import Builder from kivy.uix.recycleview.views import RecycleDataViewBehavior from kivy.uix.button import Button from kivy.uix.recyclegridlayout import RecycleGridLayout from kivy.uix.behaviors import

how to pass more then one parameter in pop up box when click on row

北城以北 提交于 2020-01-14 06:10:11
问题 user.py import kivy kivy.require('1.9.0') # replace with your current kivy version ! import sqlite3 as lite from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.properties import BooleanProperty, ListProperty, StringProperty, ObjectProperty,NumericProperty from kivy.lang import Builder from kivy.uix.recycleview.views import RecycleDataViewBehavior from kivy.uix.button import Button from kivy.uix.recyclegridlayout import RecycleGridLayout from kivy.uix.behaviors import

Return ID of button when clicked Kivy Python

余生长醉 提交于 2020-01-14 05:54:28
问题 Simple problem I'm having: When I click a button in my Kivy/Python app, I want to gain access to the ID of that button. # Kivy code Button: id: position_1 on_press: app.access_button_id() I have had various trial and error attempts but I cannot figure it out. The button is nested as follows (as part of a bigger app), if this is a factor in my problem: FloatLayout: AnchorLayout: ScreenManager: Screen: BoxLayout: FloatLayout: Button: id: position_1 on_press: app.access_button_id() Here is my

Return ID of button when clicked Kivy Python

最后都变了- 提交于 2020-01-14 05:54:08
问题 Simple problem I'm having: When I click a button in my Kivy/Python app, I want to gain access to the ID of that button. # Kivy code Button: id: position_1 on_press: app.access_button_id() I have had various trial and error attempts but I cannot figure it out. The button is nested as follows (as part of a bigger app), if this is a factor in my problem: FloatLayout: AnchorLayout: ScreenManager: Screen: BoxLayout: FloatLayout: Button: id: position_1 on_press: app.access_button_id() Here is my

un_active button until function finished in kivy

自古美人都是妖i 提交于 2020-01-14 05:25:13
问题 I am using kivy for UI. there is a Time_consuming function and when it runs, kivy ui will goes in black, so I used Threading. I want to disable buttons until Time_consuming function finishes, and then enable button again. I have been used something like below: from threading import Thread from kivy.clock import Clock from functools import partial def run(): self.run_button.disabled=True self.back_button.disabled=True t=Thread(target=Time_consuming(), args=()) t.start() Clock.schedule_interval

un_active button until function finished in kivy

泄露秘密 提交于 2020-01-14 05:25:06
问题 I am using kivy for UI. there is a Time_consuming function and when it runs, kivy ui will goes in black, so I used Threading. I want to disable buttons until Time_consuming function finishes, and then enable button again. I have been used something like below: from threading import Thread from kivy.clock import Clock from functools import partial def run(): self.run_button.disabled=True self.back_button.disabled=True t=Thread(target=Time_consuming(), args=()) t.start() Clock.schedule_interval

Bind a function to multiple dynamically created buttons in kivy?

依然范特西╮ 提交于 2020-01-14 05:01:21
问题 Problem I want to create multiple buttons and bind them to a function. The problem is that whenever I click on one button, the function is called multiple times. It seems to be a problem with the event connection. When I look at the instance that called the function when I pressed a button, it seems that the function gets called from every button at once?! KV Code: ... # This is the button that I'am using <ProjectSelectButton>: height: 35 background_color: 0,0,1,1 on_touch_down: self.click_on

How to hide python code file and other related files in a kivy project

痴心易碎 提交于 2020-01-14 01:40:12
问题 I have recently published an Android application on Google Play written in Python/Kivy. Normally the "build.py" script would wrap the whole project files into one single folder that is the application package folder. But if i check the content of this package on my phone after the installation of the apk i can find the "android.txt" file, the ".kv/.kv~" file and the ".py~"* and * "pyo" files. My question is: is this safe to expose the source code files or is there something that i am missing

Kivy之Video控件播放远程RTSP流

人走茶凉 提交于 2020-01-13 19:19:07
软件版本 Python: 3.7.3 OS: Win7 Kivy: 1.11.1 VLC: 3.0.8 简要介绍 VLC中,RTSP是基于UDP协议开发的 1 ,服务端进行串流,客户端可以播放其视频流。Kivy的Video控件是基于Gstream开发的,能够解析各种格式的视频。 步骤 第一步,服务端VLC串流 点击VLC选项卡 媒体 -> 流 -> 文件 -> 添加 -> 串流 -> 下一个 -> 目标设置 ,选择 RTSP 并点假 添加 按钮。 输入 play ,作为其访问路径 接着进行 流输出 设置,选择编码方式为 H.264 ,输出格式为 MP3(MP4) 点击 下一个 ,接着点击 流 即可 结果就是这个样子的 第二步,客户端播放RTSP流 如下代码即可创建一个播放RTSP流的客户端视频控件 filename = 'rtsp://192.168.0.100:8554/play' video = Video ( source = filename , play = 'True' , pos = ( 0 , 120 ) , volume = 0.8 ) 其效果是下图所示 图中上部分呈现的就是播放服务端的视频流。下部分是调用的本机摄像头视频实时流。 结论 Kivy有相当多的成熟的控件供开发者使用,很简单地调用即可完成开发。 https://www.cnblogs.com