I believe there are multiple ways to do it, including the wxBitmap way. But the easiest way is with wxIcon.
Here, wx.BITMAP_TYPE_ICO specifies that the file is .ico. I've found that no other format will handle transparency very well (including PNG) for application icons.
class myApp(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, None,
pos=wx.DefaultPosition, size=wx.Size(548, 438),
style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN,
title="My Application")
favicon = wx.Icon('favicon.ico', wx.BITMAP_TYPE_ICO, 16, 16)
wx.Frame.SetIcon(self, favicon)
Edit: And here's the
Alphabetical Class Reference. Perhaps the most useful thing out there for wxWidgets and wxPython.