/usr/share/pymt-examples/widgets/labelanchor.py is in python-pymt 0.5.1-0ubuntu3.
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 | from pymt import *
layout = MTGridLayout(cols=3)
size = (200, 200)
text = 'Hello World\nAnchor X: %s\nAnchor Y: %s'
style = {'bg-color': (0, .2, 0, 1), 'draw-background': 1}
for anchor_x in ('left', 'center', 'right'):
for anchor_y in ('top', 'middle', 'bottom'):
label = MTLabel(label=text % (anchor_x, anchor_y), size=size,
anchor_x=anchor_x, anchor_y=anchor_y,
halign=anchor_x, valign=anchor_y,
style=style)
layout.add_widget(label)
runTouchApp(layout)
|