Re: Predefined colours in wxPython
Tim Roberts <[email protected]> Sat, 10 Apr 2021 22:30:37 -0700 (PDT)
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
This has pretty much always been true. The constants don't get initialized until you instantiate a wx.App() object. You don't even have to use it. On Saturday, April 10, 2021 at 7:20:03 AM UTC-7 [email protected] wrote: > I’m in the process of porting an application to python3/wx4 and just found > why a bunch of my tests fail: > > Python 3.8.5 (default, Jan 27 2021, 15:41:15) > [GCC 9.3.0] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> import wx > >>> wx.RED > wx.Colour(-1, -1, -1, 255) > >>> wx.BLACK > wx.Colour(-1, -1, -1, 255) > >>> wx.BLUE > wx.Colour(-1, -1, -1, 255) > >>> wx.RED == None > True > >>> wx.RED == wx.BLACK > True > >>> > > It seems like all predefined colours have the same « null colour » value ? > > Ubuntu 20.04, wxPython 4.1.1 (installed through pip in a venv) > > Best regards > Jérôme Laheurte > > -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/a720c076-bd0f-4668-85fd-fe040f1356d6n%40googlegroups.com.