wxPlotCanvas documentation?

David LeBlanc whisper at oz.net
Mon Jun 10 16:43:50 EDT 2002


In the lib, take a look at wxplotcanvas.py, especially the __main__ routine.
I empirically discovered that this blows up with a memory access error on
line 36 if numeric isn't installed first. Otherwise, it seems to work.

Generally speaking, Python tends to be long on code and shorter on
docuemntation. I think this is true of most open source projects. Compared
to most, Python itself is well documented (and has holes in it's
documentation too!), but it's "groupies" tend to be less so.

The solution is to:
* check out any samples/demos
* check out the wxpython wiki: http://wiki.wxpython.org/, complete with
cookbook!
* grep the source - in particular in Pythonland, look for test/demo scripts
lurking at the bottom of lib files hiding behind __main__
* as a last resort, ask on newsgroups :-)

In the case of WxWindows/WxPython itself, the WxWindows doc describes which
classes are/are not implemented in WxPython and the WxWindows doc itself is
a guide to those that are.

HINT: about your specific questions. EVT_* are events and don't throw
events, they get thrown. PlotCanvases are Frames are Windows and Window has
a GetClientSize().

Is that a WxButtLight? ;)

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of David Brady
> Sent: Monday, June 10, 2002 11:23
> To: Python
> Subject: wxPlotCanvas documentation?
>
>
> I have searched the wxPython and wxWindows
> documentation, peered through the wxdemo files, and
> searched the web in the hopes of finding the answers
> to my questions, but to no avail.
>
> I would like to write a simple graphing calculator
> program with wxPython.
>
> 1. How do I create a wxPlotCanvas in a wxFrame window?
>
> I can see in wxPython/demo/wxPlotCanvas.py  how to
> create a PlotCanvas object if I wanted, say, to run my
> graphing calculator inside the wxDemo framework, but I
> don't.  How do I instantiate this guy and stick him in
> a wxFrame class of my own deriving?
>
> 2. How do I manipulate wxPlotCanvas?
>
> From the demo code I see there are PolyMarker and
> PolyLine objects, as well as a PlotGraphics function.
> However, since I can find exactly zero documentation
> on PlotCanvas, this is all I know about this object.
>
> 3. How do I find anything in the documentation?
>
> My inability to find my wxButt in the wxDark with both
> wxHands (with or without a wxFlashlight) is not
> limited to PlotCanvas, so I'm hoping that the problem
> is on my end.  The wxPython website, as far as I can
> tell, only has one documentation link, and it's a link
> to wxWindows, not the wxPython objects that wrapper
> it.  There's a sample code section, but every last one
> of the examples is marked "To Be Written When I Have
> More Time."
>
> The wxPython homepage proudly shows a long list of
> people who claim that wxPython is a Java and/or
> TkInter killer.  All I want to know is, how the hell
> did these people figure out how to use it?
>
> I'm not complaining about wxPython, mind you.  What
> I've gotten to work makes me believe that it really is
> wonderful.  But I'm at wit's end here trying to find
> out how to do anything that isn't already in a
> tutorial.  Like get the client rect of a wxFrame
> object.  Like find out what events EVT_PAINT might
> throw.  Like use a wxBitmap to double-buffer a wxDC.
> Like do anything beyond the first four tutorial pages.
>
> HELLLLLP!
>
> (thanks)
>
> -dB
>
> =====
> David Brady
> daves_spam_dodging_account at yahoo.com
> I'm feeling very surreal today... or *AM* I?
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list