Skip to content

Instantly share code, notes, and snippets.

View dolang's full-sized avatar

dolang

View GitHub Profile
@dolang
dolang / kivy-kv-encoding.md
Last active June 30, 2018 13:22
[Draft] New Default Encoding for .kv Files: Pros / Cons

New Default Encoding for .kv Files: Pros / Cons

Note: This would be in addition to a directive like in Python files: coding: ...

UTF-8 Everywhere

  • (+) Simple, straight-forward
  • (-) Builder.load_file(...) and Builder.load_string(open(...)) would have differing behaviours (Windows, Linux without UTF-8 locale) because default open(...) uses preferred system encoding
  • (?) can't say what the impact on mobile devices is (Android/iOS)
@dolang
dolang / kivy_thread_worker.py
Last active April 25, 2018 19:20
Kivy ThreadWorker Example
"""
Kivy ThreadWorker example app.
"""
import kivy
kivy.require('1.10.0')
import threading
import time
@dolang
dolang / sdl2-dependency-matrix.org
Created April 3, 2018 20:49
SDL2 Build: Package Dependency Matrix (Families: Red Hat, Ubuntu)

SDL2 Dependency Matrix (as of 2018-04-03)

Red Hat Family

Package NameFRHF27F26EL7WkF
alsa-lib-develxxxxx
audiofile-develxxxx
dbus-develx
libX11-develxxxxx
@dolang
dolang / issue2120.py
Created March 22, 2018 07:41
Test app for Kivy issue #2120
"""
https://github.com/kivy/kivy/issues/2120
Issue was created 2014-04-28. Confirming this has not been fixed yet.
"""
from kivy.logger import Logger
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
@dolang
dolang / README.md
Last active March 21, 2018 14:22 — forked from tito/README.md
Find GL leaks from a apitrace dump

Find leaks from a apitrace dump trace

  1. Trace your program: apitrace trace python main.py
  2. Dump the trace: apitrace dump python.2.7.trace > log
  3. Check for leaks: python findleak.py log
@dolang
dolang / carousel_shader.py
Last active March 20, 2018 16:14
Simple carousel example with Kivy using ScreenManager, doing automatic transitions.