Skip to content

Instantly share code, notes, and snippets.

@kived
kived / german.py
Created September 26, 2014 14:37
german win7 test
# -*- coding: utf-8 -*-
import kivy
kivy.require('1.8.0')
from kivy.app import App
from kivy.lang import Builder
root = Builder.load_string('''
Label:
text: 'durchgeführt'
@kived
kived / asyncpopup.py
Created September 17, 2014 21:32
Kivy: asynchronous popups
import kivy
kivy.require('1.8.0')
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.popup import Popup
from twisted.internet import defer
class DeferredPopup(Popup):
@kived
kived / propdemo.py
Created September 17, 2014 17:41
kivy properties
import kivy
kivy.require('1.8.0')
import random
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.event import EventDispatcher
@kived
kived / mousepos.py
Created September 16, 2014 22:31
Kivy: mouse position
from kivy.app import App
from kivy.uix.label import Label
class TestApp(App):
def build(self):
from kivy.core.window import Window
self.label = Label()
Window.bind(mouse_pos=lambda w, p: setattr(self.label, 'text', str(p)))
return self.label
@kived
kived / addwidget.py
Created September 16, 2014 21:47
Kivy: add widgets to 'after' canvas
def add_widget(self, widget, **kwargs):
super(MyWidget, self).add_widget(widget, **kwargs)
self.canvas.remove(widget.canvas)
self.canvas.after.add(widget.canvas)
@kived
kived / recipe.sh
Created September 12, 2014 18:21
liblinphone recipe
#!/bin/bash
#VERSION_liblinphone=${VERSION_liblinphone:-0004c83}
VERSION_liblinphone=${VERSION_liblinphone:-2.2.1.1-git}
DEPS_liblinphone=()
RECIPE_liblinphone=$RECIPES_PATH/liblinphone
if [[ "$VERSION_liblinphone" == *-git ]]; then
VERSION_liblinphone=${VERSION_liblinphone:0:-4}
URL_liblinphone=
@kived
kived / tabpanel.py
Created September 9, 2014 21:36
tabbed panel
import kivy
kivy.require('1.8.0')
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.tabbedpanel import TabbedPanelItem
root = Builder.load_string('''
BoxLayout:
TabbedPanel:
@kived
kived / giftest.py
Created September 5, 2014 16:39
kivy gif test
import kivy
kivy.require('1.8.1')
from kivy.app import App
from kivy.lang import Builder
root = Builder.load_string('''
Image:
#source: 'Newtons_cradle_animation_book_2.gif'
source: 'flies2.gif'
@kived
kived / dynamic.kv
Last active August 29, 2015 14:06
dynamic class
<MyWidget@BoxLayout>:
orientation: 'vertical'
my_button: btn
Label:
text: 'my text'
Button:
id: btn
text: 'OK'
@kived
kived / output.txt
Created September 3, 2014 21:34
gst debug output
0:00:00.000124579 26334 0x1b0aa00 INFO GST_INIT gst.c:502:init_pre: Initializing GStreamer Core Library version 1.2.4
0:00:00.000269073 26334 0x1b0aa00 INFO GST_INIT gst.c:503:init_pre: Using library installed in /usr/lib/x86_64-linux-gnu
0:00:00.000342159 26334 0x1b0aa00 INFO GST_INIT gst.c:513:init_pre: Linux ryan-lappy 3.13.0-35-lowlatency #62-Ubuntu SMP PREEMPT Fri Aug 15 02:26:48 UTC 2014 x86_64
0:00:00.002408655 26334 0x1b0aa00 INFO GST_INIT gstmessage.c:123:_priv_gst_message_initialize: init messages
0:00:00.002708527 26334 0x1b0aa00 INFO GST_INIT gstcontext.c:77:_priv_gst_context_initialize: init contexts
0:00:00.003271691 26334 0x1b0aa00 INFO GST_PLUGIN_LOADING gstplugin.c:317:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.003658206 26334 0x1b0aa00 INFO GST_PLUGIN_LOADING gstplugin.c:225:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00