2

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.

  • Please refer to my post [Code example showing how to use two Kivy files in the main Python script](https://stackoverflow.com/questions/49443284/kivy-object-has-no-attribute-error/49502736?noredirect=1#comment86013020_49502736) – ikolim Mar 28 '18 at 15:23

1 Answers1

1

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.
Dariusz Krynicki
  • 2,544
  • 1
  • 22
  • 47