wxPython documentation

O

Olivier

Where could I find a good documentation about wxPython (a documentation
which is not for C++ !!!)

Olivier
 
J

Jonathan Daugherty

# Where could I find a good documentation about wxPython (a documentation
# which is not for C++ !!!)

There are some wxpython tutorials and documents but the official wxPython
documentation is the wxWindows documenation itself -- wxPython notes are
sprinkled throughout.

--

Jonathan Daugherty
http://www.cprogrammer.org

"It's a book about a Spanish guy called Manual, you should read it."
-- Dilbert
 
N

Nuff Said

Where could I find a good documentation about wxPython (a documentation
which is not for C++ !!!)

You will find a lot of stuff (including a tutorial) on the
wxPython wiki:

http://wiki.wxpython.org/

Moreover, the source code of the demos coming with wxPython
is very helpful for many people.

But don't give up on the C++ documentation; you will need it
when you want to do more advanced stuff with wxPython (and it
isn't really hard to translate from C++ to Python in that case).

HTH / Nuff
 
S

simo

There are some wxpython tutorials and documents but the official wxPython
documentation is the wxWindows documenation itself -- wxPython notes are
sprinkled throughout.

This is what I found off-putting about PyQt - the documentation
basically points you to the Qt C++ docs:

http://www.riverbankcomputing.co.uk/pyqt/docs/PyQt.html

If we've got to figure out the C++ code and convert it to Python, we
may as well just skip Python and write in C++!

The wxPython Wiki is OK, it's a bit brief though, but I've just looked
at wxPython today and figured out how to make a basic Windows
application "shell" in 3 hours or so:

http://wiki.wxpython.org/index.cgi/FrontPage

TKinter has the best documentation, although TKinter is a bit dated
looking, slow and has few widgets:

http://www.pythonware.com/library/tkinter/introduction/index.htm

At least [with a manifest file] py2exe makes an XP-looking program,
that's better than TKinter (not tried the commercial Windows PyQT,
just GPL Linux).
 
K

Ken Godee

simo said:
This is what I found off-putting about PyQt - the documentation
basically points you to the Qt C++ docs:

I find Qt's c++ Doc's to be a great/complete set of documents.
In a very short period of time one can just look at the c++ docs
and know how to convert it to PyQt.

But....If one finds it to confusing, "www.thekompany.com" sells
a set of "Qt c++" docs converted to "PyQt", I think they get about
$15.00 bucks for it or/and it's included with Blackadder.
 
S

simo

Ken Godee said:
I find Qt's c++ Doc's to be a great/complete set of documents.
In a very short period of time one can just look at the c++ docs
and know how to convert it to PyQt.

Very complete, but not too clear IME :-(
But....If one finds it to confusing, "www.thekompany.com" sells
a set of "Qt c++" docs converted to "PyQt", I think they get about
$15.00 bucks for it or/and it's included with Blackadder.

http://www.thekompany.com/products/pyqtdoc/

Yeah, $20, it's still basically Qt Assistant, but with some Python
demo's.

I might get BlackAdder for $80 seeing as it includes this and a [Py]QT
license, although I think I'll wait until they get the
Windows/OSX/Ruby stuff working again, I don't like a product that
removes functionality when it comes out of beta! At the moment I'm
doing OK with Qt Designer and pyuic ;o)

At the moment I'm stuck in GUI Hell! I like TKinter as its easy, but
it looks bad and has limited widgets, I like PyQt as it has lots of
[native] widgets and everyone I talk to is praising Qt, but I think
I'm going to go with wxPython as it's completely free, looks
native[ish] and has current working Linux/Windows versions.
 
R

Richard James

Olivier said:
Where could I find a good documentation about wxPython (a documentation
which is not for C++ !!!)

Olivier

If C++ docs are "easy" to convert in your head to Python.
It does help if YOU KNOW how to program C++ first.
So much for learning Python as a first computer language!
And if you have to learn C++ first, then why do you need Python?

Why do all programmers seem to think good documention is optional?
Or an exercise left to the reader?

Documentation quality tells a lot about the programmer.
If a programmer can't communicate to his users how his program works.
It is a warning sign that the program has not been fully designed, but
hacked together haphazardly.

And why would you even want to try and use poorly designed software?

Say, like on the Spirit Mars Rover.

-- Richard
 
G

Gerrit Holl

Richard said:
Why do all programmers seem to think good documention is optional?

In my humble opinion, it is not fair to say this on a Python list.
Python documentation is generally very good and Guido van Rossum is one
of the few good opensource programmers who writes good documentation as
well. The law in my .sig does not apply to Python.

Gerrit.
 
K

Ken Godee

Richard said:
If C++ docs are "easy" to convert in your head to Python.
It does help if YOU KNOW how to program C++ first.

Follow the bouncing ball...

"The Qt c++ doc's are easy to look at and convert over
to PyQt "

I didn't say C++ was easy to convert to python.

The Object-Oriented programming is part of python.

All that's left is looking at and converting
function/method parameters.

Python/PyQt takes care of all the memory/arrays/pointers
/clean up, etc.

Here's a complete working example in under 20 lines
of code that includes a dialog window, button wigdet,
and signal/slot.

==================================================================
import sys
from qt import *

class Form1(QDialog):

def __init__(self,parent = None,name = None,modal = 0,fl = 0):
QDialog.__init__(self,parent,name,modal,fl)

# Qt C++ Doc = QPushButton::QPushButton \
# ( QWidget * parent, const char * name = 0 )


self.PushButton1 = QPushButton(self,"PushButton1")

# Qt C++ Doc = void QWidget::setGeometry ( const QRect & )
self.PushButton1.setGeometry(QRect(70,55,84,22))

# Qt C++ Doc = void QButton::setText ( const QString & )
self.PushButton1.setText("Close!")

self.connect(self.PushButton1,SIGNAL("clicked()"),self.PushButton1_clicked)

def PushButton1_clicked(self):
self.close()

a = QApplication(sys.argv)
w = Form1()
a.setMainWidget(w)
w.show()
w.exec_loop()
==================================================================
So much for learning Python as a first computer language!
And if you have to learn C++ first, then why do you need Python?
The debates over writing C++ vs Python are all over
the list.

Even if you know C++ there are many reasons to use python.
You can create a program in less than 1/2 the time for starters.
Why do all programmers seem to think good documention is optional?
Or an exercise left to the reader?
"All programmers? I'd say some are just very busy writing code
and if they document thier code properly, you should be good to go.
Companies with backing, writing a program will bring on a technical
writer to produce the docs so the programmers can continue to do
what the do best. Open source is a little different. Just trying to
keep up with everything in your "free" time is hard to do.
Try hosting an open source program and you'll find out.
Documentation quality tells a lot about the programmer.
If a programmer can't communicate to his users how his program works.
It is a warning sign that the program has not been fully designed, but
hacked together haphazardly.

That's the dumbest thing I read in a while.
And why would you even want to try and use poorly designed software?

Sounds like you should just be getting your software from compusa.
Say, like on the Spirit Mars Rover.

I think NASA has a few technical writers.
Of coarse it doesn't say much for the "Meteric vs.US"
measurement snaffu.
 
J

Josiah Carlson

If C++ docs are "easy" to convert in your head to Python.
It does help if YOU KNOW how to program C++ first.
So much for learning Python as a first computer language!
And if you have to learn C++ first, then why do you need Python?

Spend a few hours learning C++ syntax. It is easy. And you'll then be
able to use all the 'hard' documentation that you couldn't before.

The reasons that people use Python, as opposed to C++, are varied and
nontrivial. If you don't know the reasons why /you/ use Python as
opposed to other languages, then why don't you give C++, Java, Scheme,
etc., a shot. If you find that they float your boat better than Python,
then use them. No one is forcing you to use Python. No one is forcing
you to use wxPython or PyGTK or PyQT. But understand that sometimes you
will need to /learn/ in order to use.

Why do all programmers seem to think good documention is optional?
Or an exercise left to the reader?

The wxWindows documentation is fairly optimal for C++ programmers. It
is tolerable for Python programmers. Why? Because a large portion of
Python programmers knew C/C++ before finding Python, and it is an easy
translation. Those people that only know Python are limiting themselves
intellectually. Learning other languages and methodologies will allow
them to understand the context of Python, and in the case of learning
C++, will allow them to use documentation that they couldn't before.

The fact is, C++ function calls are self-documenting, where each
argument tells you what its type is:

wxButton(wxWindow* parent, wxWindowID id, const wxString& label, const
wxPoint& pos, const wxSize& size = wxDefaultSize, long style = 0, const
wxValidator& validator, const wxString& name = "button")

It is relatively easy for someone who knows the general syntax of C++ to
have no problems using the same documentation. And as I said earlier,
learning general C++ syntax is easy. Heck, if hundreds of thousands of
undergraduate computer science majors can do it between ~1990 and ~1999,
then you (and everyone else) can too.

Documentation quality tells a lot about the programmer.
If a programmer can't communicate to his users how his program works.
It is a warning sign that the program has not been fully designed, but
hacked together haphazardly.

Ahh, but as I said earlier, wxWindows C++ documentation is high quality.
Translating everything from C++ to Python would take a shitload of
time, and wouldn't necessarily gain anything. 'Fixing' the above call
would result in:

wxButton(parent, id, label, pos = wxDefaultPosition, size =
wxDefaultSize, style = 0, validator = None, name = "button")

But how has the call been simplified? Now we need to spend 20 lines
telling people exactly what types of things need to be passed, where the
original C++ documentation did just fine.


Furthermore, wxWindows people wrote the documentation for C++
developers. The group of people wrapping wxWindows calls for Python
have no reason to spend their time 'fixing' the hundreds of pages of
documentation, when a resonably intelligent Python programmer should be
able to spend an hour learning general C++ syntax, and have no problems
understanding the wxWindows documentation.

It is not a matter of poor design, or poor-quality software, it is a
matter of; it is already documented in a reasonable format. Those who
don't find the format reasonable, have limited programming experience in
the first place, are not self-motivated enough to learn the syntax, and
no amount of documentation will help them.


Hell, take for example the 10 posts in the last couple weeks about, "how
do I start up an external program from Python, I've looked at the
documentation, but it isn't possible". There are no less than 22 calls
that allow you to start an external program, all fully documented.
Apparently they haven't spent 5 minutes reading through the os module.
Say, like on the Spirit Mars Rover.

It is working now. They fixed it. I'd say that the ability to write
software that can recover from failures is an example of good software,
not bad.

- Josiah
 
R

Ronald Oussoren

If C++ docs are "easy" to convert in your head to Python.
It does help if YOU KNOW how to program C++ first.
So much for learning Python as a first computer language!
And if you have to learn C++ first, then why do you need Python?

Why do all programmers seem to think good documention is optional?
Or an exercise left to the reader?

Another reason why wxPython has no seperate documentation is probably
that "translating" the C++ oriented documentation is a major effort
(there is a lot of documentation) and there is only a small team
working on wxPython. Because the existing documentation is usuable
enough it is understandable that they choose to work on improving
wxPython instead of translating the existing documentation.

The same issue can be seen with wrappers for other large libraries.

Ronald
 
J

Jarek Zgoda

Ronald Oussoren said:
Another reason why wxPython has no seperate documentation is probably
that "translating" the C++ oriented documentation is a major effort
(there is a lot of documentation) and there is only a small team
working on wxPython. Because the existing documentation is usuable
enough it is understandable that they choose to work on improving
wxPython instead of translating the existing documentation.

The same issue can be seen with wrappers for other large libraries.

The very same issue with PyQt (X11 free edition) didn't surprise me.
Additionally, wxWindows documentation has some wxPython remarks (such as
in case of overloaded methods), which Qt documentation lacks. But this
is fine for me, I can live with that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,947
Members
47,501
Latest member
Ledmyplace

Latest Threads

Top