Q:

How to change the icon on the window when I run my program in KIVY

So I have read how to change the ICON on the window, however it seems to not be changing the icon when I run my program using Kivy and Python. Inside my python code there is something like this:
from kivy.core.window import Window
from kivy.config import Config
from kivy.app import App

Config.window_icon = "Desktop/X.jpg"

Lets say my picture is named X.jpg and has that right path. Is there another way to change that icon: The picture is attached to show what Icon I want to change.
I am using Python 2.7.x and Kivy 1.9.1 
Thanks~

A:

The previous answer didn't work for me and I found another solution that did, so I wanted to share.
In build you can add:
self.icon = 'ico/path.ico'

A:

According to the documentation - Application

Icon of your application. The icon can be located in the same directory as your main file. You can set this as follows:

class MyApp(App):
def build(self):
    self.icon = 'myicon.png'

Changed in version 1.8.0: icon is now a StringProperty. Don’t set the icon in the class as previously stated in the documentation. 
Note
For Kivy prior to 1.8.0, you need to set this as follows:

class MyApp(App):
    icon = 'customicon.png'

Recommended 256x256 or 1024x1024? for GNU/Linux and Mac OSX 32x32 for Windows7 or less. <= 256x256 for windows 8 256x256 does work (on Windows 8 at least), but is scaled down and doesn’t look as good as a 32x32 icon.

A:

Refering to:
https://kivy.org/docs/api-kivy.config.html
this should do it:
from kivy.config import Config
Config.set('kivy','window_icon','path/to/icon.ico')

