How to use wxPython documentation

In an earlier query, the answers to my problem were two methods: wx.Image.IsOk(), and wx.EmptyImage(). The former one I should have found, but the latter one is not in the documentation I've been using.

I'm running wxPython version: 2.8.9.1 (msw-unicode) over Python 2.6.1 on Windows XP. Documentation is in the wxPython 2.8 docs & demos directory.

I've been using the wxWidgets help file for documentation, even though it mostly uses C++ descriptions. That doesn't usually bother me, since I used C++ for many years. But it doesn't have EmptyImage() in it. I suspect that it was added in the Python port.

I can see the docs in http://www.wxpython.org/docs/api/ and I can see the .py source (with pydoc string) in _core.py

but there doesn't seem to be a single place I can look for everything.

Suggestions?

Related question: I'm using Komodo 5.0.3 for an IDE, and its autocomplete and calltips logic can't parse much of the wxPython source. It uses static parsing, not reflection, so I'm not surprised, given all the clever things done in the sources to simplify the visible interface. But I was wondering if anybody has built a "API Catalog file" for wxPython (it would have an extension of .cix) Ideally, it could be auto-generated from some form of docs that are already maintained by wxPython.

Thanks, DaveA

Dave Angel wrote:

In an earlier query, the answers to my problem were two methods: wx.Image.IsOk(), and wx.EmptyImage(). The former one I should have found, but the latter one is not in the documentation I've been using.

I'm running wxPython version: 2.8.9.1 (msw-unicode) over Python 2.6.1 on Windows XP. Documentation is in the wxPython 2.8 docs & demos directory.

I've been using the wxWidgets help file for documentation, even though it mostly uses C++ descriptions. That doesn't usually bother me, since I used C++ for many years. But it doesn't have EmptyImage() in it. I suspect that it was added in the Python port.

I can see the docs in wxPython API Documentation — wxPython Phoenix 4.2.2 documentation and I can see the .py source (with pydoc string) in _core.py

but there doesn't seem to be a single place I can look for everything.

Suggestions?

Related question: I'm using Komodo 5.0.3 for an IDE, and its autocomplete and calltips logic can't parse much of the wxPython source. It uses static parsing, not reflection, so I'm not surprised, given all the clever things done in the sources to simplify the visible interface. But I was wondering if anybody has built a "API Catalog file" for wxPython (it would have an extension of .cix) Ideally, it could be auto-generated from some form of docs that are already maintained by wxPython.

Thanks, DaveA

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

EmptyImage and EmptyBitmap are from the wx "core" library, such as other methods like wx.Yield(), wx.Sleep() and a whole lot of others - see from wxPython API Documentation — wxPython Phoenix 4.2.2 documentation and onwards

What I do for searching documentation, is start off Googling my problem, phrasing it as simply as possible (like, wxpython tree click event) and then that usually leads me to some older discussion on the mailing list that will at least say the classes/methods involved

It's just up to you then to search the appropriate classes. I think a page listing "everything" would be huuuuge :slight_smile:
(I think just the list of all wx classes is really big, let alone having method lists

Hi Dave,

Dave Angel wrote:

In an earlier query, the answers to my problem were two methods: wx.Image.IsOk(), and wx.EmptyImage(). The former one I should have found, but the latter one is not in the documentation I've been using.

I'm running wxPython version: 2.8.9.1 (msw-unicode) over Python 2.6.1 on Windows XP. Documentation is in the wxPython 2.8 docs & demos directory.

I've been using the wxWidgets help file for documentation, even though it mostly uses C++ descriptions. That doesn't usually bother me, since I used C++ for many years. But it doesn't have EmptyImage() in it. I suspect that it was added in the Python port.

I use Boa Constructor and in it I hit ctrl-h and type e.g. "emptyimage", which brings up the appropriate doc. I could also have searched for "image" which then would have brought up a long list and one item is "EmptyImage". Boa searches in both the wxWidgets and the wxPython API, actually in any help book which is loaded/defined. Currently it is 2.8.4 version of the doc, but I am pretty sure that if one would search a bit one could build/replace these with newer versions.

Werner

Dave,

In an earlier query, the answers to my problem were two methods: wx.Image.IsOk(), and wx.EmptyImage(). The former one I should have found, but the latter one is not in the documentation I've been using.

I'm running wxPython version: 2.8.9.1 (msw-unicode) over Python 2.6.1 on Windows XP. Documentation is in the wxPython 2.8 docs & demos directory.

I've been using the wxWidgets help file for documentation, even though it mostly uses C++ descriptions. That doesn't usually bother me, since I used C++ for many years. But it doesn't have EmptyImage() in it. I suspect that it was added in the Python port.

I can see the docs in wxPython API Documentation — wxPython Phoenix 4.2.2 documentation and I can see the .py source (with pydoc string) in _core.py

but there doesn't seem to be a single place I can look for everything.

Suggestions?

Related question: I'm using Komodo 5.0.3 for an IDE, and its autocomplete and calltips logic can't parse much of the wxPython source. It uses static parsing, not reflection, so I'm not surprised, given all the clever things done in the sources to simplify the visible interface. But I was wondering if anybody has built a "API Catalog file" for wxPython (it would have an extension of .cix) Ideally, it could be auto-generated from some form of docs that are already maintained by wxPython.

Thanks, DaveA

I alternate between using Google and Andrea's specialized docs: http://xoomer.virgilio.it/infinity77/wxPython/index.html

It looks like Andrea's search functionality works quite well, although it's not as lightning fast as Google.

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

<snip>

If you go to the wxPython Docs page and search for 'emptyimage' you
will find it there.[1]

Scott

[1]wxPython API Documentation — wxPython Phoenix 4.2.2 documentation

···

On Tue, Mar 10, 2009 at 12:38 PM, Dave Angel <davea@ieee.org> wrote:

In an earlier query, the answers to my problem were two methods:
wx.Image.IsOk(), and wx.EmptyImage(). The former one I should have found,
but the latter one is not in the documentation I've been using.

Hi,

Can I make a comment?

Is it just me or does anybody else find the wxPython Documentation
unsatisfactory?

I came from using Delphi, and the VCL is extremely consistant and well
documented.

Where would I go if I wanted to help with a revamp the wxpython
documentation?

I'm hoping something can be done about it and might have some time to spare
to do it.

David

hi david,

David Lyon wrote:

Hi,

Can I make a comment?

Is it just me or does anybody else find the wxPython Documentation
unsatisfactory?
  

I came from Delphi too, so I understand your feelings :wink:
Everything is relative,
compared to other Python (maybe even all open source) packages wxPython is quit well documented,
compared to Delphi it's indeed below zero.

The best doc I found, is here:

And I can assure you that the people on this list are very very cooperative,
in helping people with their wxPython problems.

cheers,
Stef

Hi Stef,

I came from Delphi too, so I understand your feelings :wink:
Everything is relative,
compared to other Python (maybe even all open source) packages wxPython
is quit well documented,
compared to Delphi it's indeed below zero.

Sure is...

The best doc I found, is here:
wxPython tutorial - Python GUI programming in wxPython

It does look good.

But we seem to be lacking a class property/method reference document.

Where one can simply lookup how to turn on or turn off something really
simple on a control. A class reference for working people using wxpython.

And I can assure you that the people on this list are very very
cooperative,
in helping people with their wxPython problems.

I don't disagree with that.

But in the old days of programming you would have a book. Need to know
a function? look it up on page 478 etc... then with Delphi... look it
up in their help system.

Now with wxPython.... look through every page from a search engine...

Check Google... Koders... Yahoo etc...

Get all the code examples from groups that "don't" work (can you fix
my broken code please ? something doesn't work)

And when that fails... post to a newsgroup...

:slight_smile:

omg....

Yes, the tuturial you showed was great....

My point is I think we should look at bringing the documentation
of wxpython up to date.....

At the moment... it seems too hard...

It would be good if we could fix it....

David

···

On Wed, 11 Mar 2009 00:14:34 +0100, Stef Mientki <s.mientki@ru.nl> wrote:

David Lyon wrote:

But in the old days of programming you would have a book. Need to know
a function? look it up on page 478 etc... then with Delphi... look it
up in their help system.

Now with wxPython.... look through every page from a search engine...

Check Google... Koders... Yahoo etc...

Get all the code examples from groups that "don't" work (can you fix
my broken code please ? something doesn't work)

And when that fails... post to a newsgroup...
  
ahem.
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation
combined with additional detail available from: http://docs.wxwidgets.org/stable/wx_classesbycat.html#classesbycat

and you're good to go :slight_smile:

Sometimes the wxpython docs are sparse on some function descriptions, but the wxwidgets C++ docs usually cover the method in sufficient detail. Failing that, these archives have been running since 2001 so a lot of problems can be solved with Googling + research

Hi Steve,

If you read carefully your response, you're actually agreeing with me. :slight_smile:

(The documentation is all over the place - and answers take a long time to
find)

When I finish up some other priorities... I might come back to this...

Take care

David

···

On Tue, 10 Mar 2009 23:42:35 +0000, Steven Sproat <sproaty@gmail.com> wrote:

ahem.
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation
combined with additional detail available from:
http://docs.wxwidgets.org/stable/wx_classesbycat.html#classesbycat

and you're good to go :slight_smile:

Sometimes the wxpython docs are sparse on some function descriptions,
but the wxwidgets C++ docs usually cover the method in sufficient
detail. Failing that, these archives have been running since 2001 so a
lot of problems can be solved with Googling + research
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Hi Steve,

If you read carefully your response, you're actually agreeing with me. :slight_smile:

(The documentation is all over the place - and answers take a long time to
find)

I thought Steve might have been responding to you saying:

But we seem to be lacking a class property/method reference document.

Where one can simply lookup how to turn on or turn off something really
simple on a control. A class reference for working people using wxpython.

He did give you two versions of class references for wxPython/wxWidgets, which
are nearly the same.

Another version--for wxPython specifically and looking pretty nice it
seems to me,
is Andrea Gavana's:

http://xoomer.virgilio.it/infinity77/wxPython/APIMain.html

And as Werner said, Boa Constructor has the wxPython API bundled up in
its help books, too.

I have used all of these to very good effect.

Maybe I'm missing what you are looking for?

Che

···

On Tue, Mar 10, 2009 at 7:53 PM, David Lyon <david.lyon@preisshare.net> wrote:

Maybe I'm missing what you are looking for?
  

well you're simply missing "the Delphi experience" :wink:
(you don't search for the documentation, the documentation is coming to you)

cheers,
Stef

That sounds sort of mystical, Stef. :slight_smile: I wish I did know more about The
Delphi Experience, particularly since Boa is intended to be a kind of Delphi
for wxPython.

Che

···

On Tue, Mar 10, 2009 at 8:46 PM, Stef Mientki <s.mientki@ru.nl> wrote:

Maybe I'm missing what you are looking for?

well you're simply missing "the Delphi experience" :wink:
(you don't search for the documentation, the documentation is coming to you)

1) on the wxpython web site....

or

2) listed as "wxPython Class Reference"....

or

3) on the F1 key in Boa Constructor (Help key)

Something simple like that..

As in... where people can actually find it....

···

On Tue, 10 Mar 2009 20:29:47 -0400, C M <cmpython@gmail.com> wrote:

Another version--for wxPython specifically and looking pretty nice it
seems to me,
is Andrea Gavana's:

http://xoomer.virgilio.it/infinity77/wxPython/APIMain.html

And as Werner said, Boa Constructor has the wxPython API bundled up in
its help books, too.

Maybe I'm missing what you are looking for?

Another version--for wxPython specifically and looking pretty nice it
seems to me,
is Andrea Gavana's:

http://xoomer.virgilio.it/infinity77/wxPython/APIMain.html

And as Werner said, Boa Constructor has the wxPython API bundled up in
its help books, too.

Maybe I'm missing what you are looking for?

1) on the wxpython web site....

http://www.wxpython.org/onlinedocs.php
The link at the left says "Online wxDocs". Maybe your suggestion would
be to rename this "wxPython Class Reference" or API?

Now, you might take issue that this version is written in the C++ style.
Brings to the next point...

or

2) listed as "wxPython Class Reference"....

If you type those words into Google ("wxPython class reference"), that
brings you to:
http://www.wxpython.org/docs/api/

Which is admittedly not well-titled at the top of that page at all and arguably
not the prettiest documents ever.

or

3) on the F1 key in Boa Constructor (Help key)

The F1 key in Boa does bring up the wxPython class reference, but also the
Boa help, Python help, and a few others. From there, though, it is a matter
of one click on the words "wxPython API documentation" to bring you to the
API.

Something simple like that..

As in... where people can actually find it....

Also, one can also just write, e.g., help(wx.TextCtrl) in an
interpreter for a quick
listing of methods.

Best,
Che

···

On Tue, Mar 10, 2009 at 8:58 PM, David Lyon <david.lyon@preisshare.net> wrote:

On Tue, 10 Mar 2009 20:29:47 -0400, C M <cmpython@gmail.com> wrote:

David Lyon wrote:

  

Another version--for wxPython specifically and looking pretty nice it
seems to me,
is Andrea Gavana's:

http://xoomer.virgilio.it/infinity77/wxPython/APIMain.html

And as Werner said, Boa Constructor has the wxPython API bundled up in
its help books, too.

Maybe I'm missing what you are looking for?
    
1) on the wxpython web site....

or

2) listed as "wxPython Class Reference"....

or

3) on the F1 key in Boa Constructor (Help key)

Something simple like that..

As in... where people can actually find it....

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Well, what I've experienced is that I read/followed along with a couple of wx tutorials to get a feel for using the system to create, position widgets and to setup event handling. I learned all this by following the example code, tutorials over at wxPython tutorial - Python GUI programming in wxPython, the API, the wiki and searching the web in general.

Sure, that's a wide range of sources, but at the end of the day, it's not that much really. It doesn't take too long to get a nice feel for wx and you'll be comfortable coding away in no time :slight_smile:

···

On Tue, 10 Mar 2009 20:29:47 -0400, C M <cmpython@gmail.com> wrote:

With an expert eye... you probably can find everything...

For developers coming from other environments that are more
cleanly laid out.... it comes across as being very disjointed
and messy.

Code examples are my biggest issue on the class reference..

There appear to be none...

In Delphi and VB and every other language you got a code example of how to
use a method/function... you didn't need to go off to a search engine and
look for 10 minutes each time to see how to actually do something.

This is the biggest frustration for any new user....

Anyway...

I am not complaining - just providing feedback.

1) Fix the links on the wxPython main documentation
2) Get all the C++ out of the wxPython documentation
3) Get all the main classes (~50), properly documented
4) Get code examples for #3
5) Revise and update existing documentation

Thats it really...

and all will be good/better

Another version--for wxPython specifically and looking pretty nice it
seems to me,
is Andrea Gavana's:

http://xoomer.virgilio.it/infinity77/wxPython/APIMain.html

And as Werner said, Boa Constructor has the wxPython API bundled up in
its help books, too.

Maybe I'm missing what you are looking for?

1) on the wxpython web site....

http://www.wxpython.org/onlinedocs.php
The link at the left says "Online wxDocs". Maybe your suggestion would
be to rename this "wxPython Class Reference" or API?

Now, you might take issue that this version is written in the C++ style.
Brings to the next point...

or

2) listed as "wxPython Class Reference"....

If you type those words into Google ("wxPython class reference"), that
brings you to:
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation

Which is admittedly not well-titled at the top of that page at all and
arguably
not the prettiest documents ever.

or

3) on the F1 key in Boa Constructor (Help key)

The F1 key in Boa does bring up the wxPython class reference, but also

the

Boa help, Python help, and a few others. From there, though, it is a
matter
of one click on the words "wxPython API documentation" to bring you to

the

···

On Tue, 10 Mar 2009 21:12:34 -0400, C M <cmpython@gmail.com> wrote:

API.

Something simple like that..

As in... where people can actually find it....

Also, one can also just write, e.g., help(wx.TextCtrl) in an
interpreter for a quick
listing of methods.

Best,
Che
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

but at the end of the day I want 500 lines of code written not 18.....

I'm not saying there is nothing... what I am saying is that what is there
is poorly organised and needs revising...

Sending people out to a search engine as a defence is not something
most people would accept with commercial software.

There's a heck of good open source software with great documentation...

Django... etc....

Let's fix this...

···

On Wed, 11 Mar 2009 01:16:54 +0000, Steven Sproat <sproaty@gmail.com> wrote:

Well, what I've experienced is that I read/followed along with a couple
of wx tutorials to get a feel for using the system to create, position
widgets and to setup event handling. I learned all this by following the
example code, tutorials over at wxPython tutorial - Python GUI programming in wxPython, the API,
the wiki and searching the web in general.

Sure, that's a wide range of sources, but at the end of the day, it's
not that much really. It doesn't take too long to get a nice feel for wx
and you'll be comfortable coding away in no time :slight_smile:

David Lyon wrote:

Let's fix this...

Well, I'd like to use the term "improve" rather than "fix", but yes, your points are well taken. However, one of the big issues is that docs take a lot of work, and it's not fun for coders, and it doesn't help anyone that is writing the code actually solve a problem.

Also, docs that are not up to date are worse than hard to navigate docs, so it would be really, really good if the core docs were essentially auto-generated from the source. That's what the "new" wxPython docs are. That was an effort Robin put in a couple years ago that has stalled -- picking up on it to get the results cleaner and neater and more easily searchable would be great.

Andrea put some work into this recently, and that spawned a discussion on this list, but I don't know that it lead anywhere.

My thoughts:

You'll need three things to make an effort like this successful:

1) The doc sources need to be integrated with the wxpython source.
    note that this is trickier due to the SWIG generated code -- but I think Robin has got that pretty well solved.

2) You need an easy way to let users contribute docs -- as mentioned examples are really nice -- if we took the current wxPython auto-generated docs and added examples to them, they'd be pretty good. If it were easy to do so, I know I'd add some -- I have a pile of examples put together.

3) A BDFL for the docs -- someone that takes an interest and really follows through on making it happen -- not do all the writing, but the coordinating and motivating

The numpy and matplotlib projects might be good examples to follow. They are using sphinx to generate nicely formated docs from docstrings, etc, and have set up a way for folks to add to them:

http://docs.scipy.org/doc/

Good luck on your efforts!

-Chris

From the C++ CHM Documentation file, end of the constructor documentation for wxImage:

wxPython note: Constructors supported by wxPython are:
wxImage(name, flag) Loads an image from a file

          wxNullImage()  Create a null image (has no size or image data) 
          wxEmptyImage(width, height)  Creates an empty image of the given size 
          wxImageFromMime(name, mimetype  Creates an image from the given file of the given mimetype 

          wxImageFromBitmap(bitmap)  Creates an image from a platform-dependent bitmap 

The C++ Documentation is sparkled with wxPython notes:

So, you see… it is documented, but I guess you do have to dig for it. I got used to searching for these notes… intuitively…

···

On Tue, Mar 10, 2009 at 6:38 PM, Dave Angel davea@ieee.org wrote:

I’ve been using the wxWidgets help file for documentation, even though it mostly uses C++ descriptions. That doesn’t usually bother me, since I used C++ for many years. But it doesn’t have EmptyImage() in it. I suspect that it was added in the Python port.


There is NO FATE, we are the creators.
blog: http://damoc.ro/