'How can I create kv file?

I read 'Creating Apps in Kivy'. And there is the code like below.

from kivy.app import App

App().run()


class WeatherApp(App):
    pass

if __name__ == '__main__':
    WeatherApp().run()

After finishing above code, the Book said you create kv file in the same directory as main.py. But I don't how to create kv file. How?? help me~~



Solution 1:[1]

In my case the file was saving as "filename.kv.txt" or "filename.kv.py". I could not change it until I enabled "File name extensions" in File Explorer

Enable File name extensions

Solution 2:[2]

Ok i see you are referring to tutorials here.

  • You can create file by right click in that directory.give it .kv extension.
  • Or in the terminal use gedit weather.kv

Now u can carry on tutorial.There are nice set of tutorial on youtube by inclement(Alexander Taylor).link

Solution 3:[3]

You should change the type of file: from "python files" to "All files" and save it with the .kv extension.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joel Stansbury
Solution 2 phunsukwangdu
Solution 3 Lesly Shreyash Ninama