Changing the application and taskbar icon - Python/Tkinter

后端 未结 5 2131
眼角桃花
眼角桃花 2020-12-17 17:12

I\'ve been working on a very simple python/tkinter script (a .pyw file) and I\'d like to change it\'s application icon (the \'file\' icon shown at the explorer window and th

5条回答
  •  一生所求
    2020-12-17 17:58

    Use

    root.iconbitmap(default='ardulan.ico')
    

    But the probleme is that it only replace the icon on the windows not on the taskbar. It's because the py file is executed from python interpreter so windows use his icon and not the tkinter icon.

    You have to 'compile' it i think with py2exe, cx_Freeze, py2app ...

    http://www.py2exe.org/index.cgi/CustomIcons

提交回复
热议问题