开门见山,程序如下。
test.kv文代码:
<Label>:
text: 'Hello World!'
main.py
import kivy
kivy.require('1.10.1')
from kivy.app import App
from kivy.uix.label import Label
class testApp(App):
def build(self):
return Label()
if __name__ == '__main__':
testApp().run()
可以在安装有Kivy的环境中调试下。