Reputation: 263
I am beginner to kivy, thought of doing one simple GUI for my project.
As i started with one python file and one kivy file, It worked fine. But now my plan is to make one complex GUI which, contains many lines of code and kivy file is growing large. So I thought of making separate modules of kivy (here making of kivy files separately and importing in one or more files) and thought to integrate with python file. I didn't find any relevant example / even GitHub repositories.
Please help me for above issue.
Thanks in advance.
Upvotes: 2
Views: 748
Reputation: 2718
Yes, it is possible.
Is it possible to read from more than one .kv file in Kivy app?
Yes it is! You can import .kv files inside files just like normal python files by starting with:
#:include otherfile.kv
If you want the file to unload and reload first you can force the import typing
#:include force otherfile.kv
instead.
All this as written in the Kivy Language Documentation which is full of useful clarifications.
Upvotes: 1