[portland] Looking for wxPython help

Robin Dunn robin at alldunn.com
Sat Apr 19 02:51:05 CEST 2014


Rich Shepard wrote:
> It's been about 8 years since I wrote a wxPython app and much has changed
> since then. I need to develop a different application now and am looking
> for
> someone local to help me get back up to speed with all the differences.
>
> One new thing I see is a super() function applied to a
> wx.Frame.__init__(), but I cannot find documentation on what it does and
> where/how it should be used.

super() is a Python function that returns a proxy object that delegates 
to to the parent class or a sibling class.  Using it is not strictly 
necessary to use it, but it can be handy especially in cases of multiple 
inheritance where the next class in a call chain may not be fully known 
at the time that a call is written.

http://stackoverflow.com/questions/576169/understanding-python-super-and-init-methods


>
> An immediate problem is positioning a wx.Panel within a wx.Frame; it's
> scrunched up in the upper left corner and I haven't found how to get the
> panel centered in the frame.

Are you using a sizer in the frame?  Does the frame have other child 
widgets?  If a frame has only one child then it will automatically 
resize it to fit in the frame's client area by default.  If it has more 
than one child or if you want different behavior then you'll either need 
to give it some help with a sizer, or explicitly manage the children's 
layout in the frame's EVT_SIZE handler.

>
> Coffee, microbrew, lunch, or dinner is offered to someone who'll sit down
> with me and help me learn the differences from 2.5.x to the current
> 3.0.0.0.

Both StackOverflow and the wxPython-users google group are excellent 
places to get help on wxPython.  There are lots of people who have time 
and are happy to help answer questions or give guidance.  If you have 
specific questions or problems with existing code then be sure to boil 
it down to a small runnable sample when you ask about it. 
http://wiki.wxpython.org/MakingSampleApps



-- 
Robin Dunn
Software Craftsman
http://wxPython.org


More information about the Portland mailing list