wxPython documentation

Ken Godee ken at perfect-image.com
Sun Feb 1 12:47:32 EST 2004


Richard James wrote:
> "Olivier" <olivier.marechal at laposte.net> wrote in message news:<401c25a3$0$11357$636a55ce at news.free.fr>...
> 
>>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.

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.






More information about the Python-list mailing list