/usr/share/kivy-examples/miscellaneous/two_panes.py is in python-kivy-examples 1.9.1-1build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | '''
Demonstrates using kv language to create some simple buttons and a
label, with each button modifying the label text.
'''
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.lang import Builder
Builder.load_string('''
<MainWidget>:
BoxLayout:
orientation: 'vertical'
Button:
text: 'some string '
on_press: the_right_pane.text += self.text
Button:
text: 'one two three four '
on_press: the_right_pane.text += self.text
Button:
text: 'follow the yellow brick road '
on_press: the_right_pane.text += self.text
Button:
text: 'five six seven eight '
on_press: the_right_pane.text += self.text
Button:
text: 'CLEAR LABEL'
on_press: the_right_pane.text = ''
Label:
id: the_right_pane
text: ''
text_size: self.size
halign: 'center'
valign: 'middle'
''')
class MainWidget(BoxLayout):
pass
class ExampleApp(App):
def build(self):
return MainWidget()
ExampleApp().run()
|