[wxPython-users] A list of all wx.CONSTANTS; available?
Chris Mellon
arkanes at gmail.com
Mon Dec 4 07:12:55 PST 2006
On 12/2/06, Kevin Grover <kevin at kevingrover.net> wrote:
> I've had the same experience. I just assumed that there was something that
> I had not yet figured out.
>
> I used to use help(), but there's often so much ancillary information that
> it's nearly impossible to find what I want, then when I do find a function,
> there are no examples and I have to troll the demo. I have a few cases
> where I could find not demos, so I gave up. My development machine at work
> is on an isolated network (no Internet access at all), so if it's not in the
> online docs, or the demo, I have to go to another room to search the net.
> This is an issue with the stock Python docs as well. Sometimes I can find
> the docs, but unless you already understand want the function does and just
> need reference, you're out of luck without some example code.
>
> One of the biggest helps would be some simple (even on-line) demos in the
> documentation. Perhaps this could be embedded into the source and
> auto-extracted?
>
> On 11/30/06, TiNo <tinodb at gmail.com> wrote:
> > 2006/11/30, Peter Damoc < pdamoc at gmail.com>:
> > > try this:
> > >
> > > import wx
> > > fragment = "LIST"
> > > for elem in dir(wx):
> > > if elem.isupper() and fragment in elem:
> > > print elem
> > >
> > > Peter
> >
> > Ah, jeah....
> >
> > Question remains though. Isn't there anything else?
> > wx.LIST_AUTOSIZE.__doc__ is not very helpful for example:
> >
> > 'int(x[, base]) -> integer\n\nConvert a string or number to an
> > integer, if possible. A floating point\nargument will be truncated
> > towards zero (this does not include a string\nrepresentation of a
> > floating point number!) When converting a string, use\nthe optional
> > base. It is an error to supply a base when converting a\nnon-string.
> > If the argument is outside the integer range a long object\nwill be
> > returned instead.'
> >
> > The API gives help on some items (such as wx.Mouse-class), mostly
> > quite sparse. This means I have to question this mailinglist alot.
> > Which works, but I'd rather look it up on the fly.
> >
> > PHP has an exellent documentation for example. With space to comment
> > and discuss etc. Why isn't there something like that? (I guess because
> > it's a lot of work...) I feel quite limited in coding with wxpython
> > because their are no easy ways for me to find out how stuff works.
> > (Googling the terms, going through the immensly slow api, or asking
> > this list...)
> >
> >
The online docs at wxPython.org are autogenerated from the source, and
you can recreate them locally if you want.
This isn't really a "how do I find this constant" question though.
This is an API question, and you can find the answers you're looking
for in the wxWidgets docs, which lists the constants that any
particular call will take. help() on the constant itself won't tell
you anything of course - they're all either integers or strings, not
any sort of special enumerated type. You need to look at the help()
(or the doc, if the docstring isn't sufficent) for the call you're
trying to pass the constant to.
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> wxPython-users-unsubscribe at lists.wxwidgets.org
> > For additional commands, e-mail:
> wxPython-users-help at lists.wxwidgets.org
> >
> >
>
>
More information about the wxpython-users
mailing list