This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<MyScreenManager>: | |
orientation: 'vertical' | |
canvas.before: | |
Color: | |
rgba: 1,1,1,1 | |
Rectangle: | |
pos: self.pos | |
size: self.size | |
MainMenuScreen: | |
FilmMenuScreen: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<MyScreenManager>: | |
MainMenuScreen: | |
<MainMenuScreen>: | |
name: 'MainMenuScreen' | |
ScrollView: | |
size_hint_x: None | |
width: root.width | |
effect_cls: 'ScrollEffect' | |
bar_width: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.uix.label import Label | |
from kivy.animation import Animation | |
class DraggableLabel(Label): | |
'''A label you can drag upside-down''' | |
def on_touch_down(self, touch): | |
if self.collide_point(*touch.pos): | |
# assure ourselves we will get the updates of this motion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ScreenManager: | |
FirstScreen: | |
<FirstScreen>: | |
FloatLayout: | |
GridLayout: | |
cols: 1 | |
canvas.before: | |
Color: | |
rgba: 1,0,1,.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.animation import Animation | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.uix.button import Button | |
from kivy.uix.label import Label | |
from kivy.graphics.vertex_instructions import Rectangle | |
from kivy.graphics.context_instructions import Color | |
from kivy.lang import Builder | |
from kivy.clock import ClockBase, Clock | |
from kivy.properties import ListProperty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[app] | |
# (str) Title of your application | |
title = My Application | |
# (str) Package name | |
package.name = myapp | |
# (str) Package domain (needed for android/ios packaging) | |
package.domain = org.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
__version__ = '1.0' | |
class MyApp(App): | |
pass | |
MyApp().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, cStringIO | |
import re | |
PATH = 'some path' | |
def download_file(path): | |
print "Attempting to download file from:" | |
print "URL: {}".format( path ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
data = json.dumps({'Name':'Jan'}) | |
requests.post('http://www.math-in-python.com', data=data, headers={'Content-Type':'application/json'}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[app] | |
# (str) Title of your application | |
title = My Application | |
# (str) Package name | |
package.name = myapp | |
# (str) Package domain (needed for android/ios packaging) | |
package.domain = org.test |
OlderNewer