Skip to content

Instantly share code, notes, and snippets.

View GreyGnome's full-sized avatar
💭
Working on my Kivy python project, codenamed "Palm".

Mike Schwager GreyGnome

💭
Working on my Kivy python project, codenamed "Palm".
View GitHub Profile
- hosts: localhost
gather_facts: false
tasks:
- debug:
msg:
- "ITEM ({{ item|type_debug }}): {{ item }}"
- "keys ( {{ _keys|type_debug }} ): {{ _keys }}"
loop: " {{ _keys }} "
vars:
_keys: [ 'bond0.160', 'bond0.197', 'bond1' ]
@GreyGnome
GreyGnome / button_submit_test.html
Created May 23, 2019 13:07
Test of Button and Submit inputs in html.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test Button/Submit</title>
</head>
<body>
<h1>Test Button/Submit</h1>
<form action="" method="">
<!-- <form action="http://wikipedia.org" method="get"> -->
from kivy.core.window import Window
from kivy.clock import Clock
from kivy.uix.widget import Widget
class Overlay(Widget):
def __init__(self, *args, **kwargs):
self.parent_container = kwargs.pop("registered_parent", None)
super(Overlay, self).__init__(*args, **kwargs)
@GreyGnome
GreyGnome / app2.py
Created July 26, 2016 13:39
Remove then add widget to a BoxLayout
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.button import Button
import time
kv = '''
BoxLayout:
canvas:
@GreyGnome
GreyGnome / scrollview.kv
Created June 27, 2016 18:27
KV file to go along with it.
#:kivy 1.0.4
<MyFloatLayout>:
canvas:
Color:
rgb: 0, 0, 0
size_hint: 1.0, 1.0
<MyLabel>:
size_hint: None, None
@GreyGnome
GreyGnome / scrollview.py
Created June 27, 2016 18:26
Example py file. If I remove the Color line, the MyLabel will inherit the color of its enclosing Layout.
import kivy
kivy.require('1.0.8')
from kivy.app import App
from kivy.uix.label import Label
from kivy.lang import Builder
from kivy.uix.floatlayout import FloatLayout
from kivy.graphics import Rectangle
from kivy.properties import StringProperty
from kivy.uix.image import Image
@GreyGnome
GreyGnome / scrollview.kv
Created June 23, 2016 22:44
Kivy file to go with my scrollview code
#:kivy 1.0.4
<MyScrollView>:
canvas:
Color:
rgb: 0.5, 0.1, 0.7
Rectangle:
pos: self.pos
size: self.size
size_hint: None, None
width: 200
@GreyGnome
GreyGnome / scrollview.py
Created June 23, 2016 12:46
My scrollview testing app. Notice how the first image in any container has distorted colors.
import kivy
kivy.require('1.0.8')
from kivy.app import App
from kivy.uix.scrollview import ScrollView
from kivy.uix.stacklayout import StackLayout
from kivy.uix.label import Label
from kivy.lang import Builder
from kivy.uix.floatlayout import FloatLayout
from kivy.graphics import Rectangle
@GreyGnome
GreyGnome / scrollview.py
Created May 28, 2016 05:58
For evaluating event propagation: Test of FloatLayout with 4 ScrollViews added to it.
import kivy
kivy.require('1.0.8')
from kivy.app import App
from kivy.uix.scrollview import ScrollView
from kivy.uix.stacklayout import StackLayout
from kivy.uix.label import Label
from kivy.lang import Builder
from kivy.uix.floatlayout import FloatLayout
@GreyGnome
GreyGnome / scrollview.py
Created May 28, 2016 05:47
For evaluating event propagation: Test of FloatLayout with 4 ScrollViews added to it.
import kivy
kivy.require('1.0.8')
from kivy.app import App
from kivy.uix.scrollview import ScrollView
from kivy.uix.stacklayout import StackLayout
from kivy.uix.label import Label
from kivy.lang import Builder
from kivy.uix.floatlayout import FloatLayout