wxPython worries

J

James Goldwater

I'm starting a new hopfully-commercial project soon, and I face a
dilemma about whether Python with wxPython would be appropriate.

The project has 3 main areas:

a) manipulation of lists and trees, using..
b) a hopefully dead-sexy gui, all in order to...
c) eventually pump out certain bits of the datastructure over the
network in semi-realtime (< 10ms accuracy or so).

The target is Win32 for now (98 - XP). Now, if it were up to me, I'd use
Delphi - it's what I know best. But I'm working with a less experienced
developer with whom I have no languages in common. He's keen to get
started on C#, I've toyed with C# and though it looks easy, I don't see
any major gains over what I already know.

I've read a lot about python and done some mini-stuff in it, and been
impressed with it's ease and conciseness. What worries me is wxPython:
looking at the demo code, it's quite verbose and 'bitty'. I'm also
unclear as to how easy custom controls are to build.

Am I just being confused by my newbie-ness, or are my initial concerns
justified? What's anybody else's experiences with gui programming in
wxPython like vs a RAD like Delphi or .NET?

Thanks,

James.
 
G

Guyon Morée

I've got the same worries, but I'm still not really convinced...
boa-constructor is nice... but not there yet
 
J

Joe Francia

James said:
I'm starting a new hopfully-commercial project soon, and I face a
dilemma about whether Python with wxPython would be appropriate.

The project has 3 main areas:

a) manipulation of lists and trees, using..
b) a hopefully dead-sexy gui, all in order to...
c) eventually pump out certain bits of the datastructure over the
network in semi-realtime (< 10ms accuracy or so).

The target is Win32 for now (98 - XP). Now, if it were up to me, I'd use
Delphi - it's what I know best. But I'm working with a less experienced
developer with whom I have no languages in common. He's keen to get
started on C#, I've toyed with C# and though it looks easy, I don't see
any major gains over what I already know.

I've read a lot about python and done some mini-stuff in it, and been
impressed with it's ease and conciseness. What worries me is wxPython:
looking at the demo code, it's quite verbose and 'bitty'. I'm also
unclear as to how easy custom controls are to build.

Am I just being confused by my newbie-ness, or are my initial concerns
justified? What's anybody else's experiences with gui programming in
wxPython like vs a RAD like Delphi or .NET?

Thanks,

James.

I share your concerns with wxPython - it's a good, powerful toolkit, but
it lacks consistent and clear documentation, and a decent screen painter
(wxGlade probably is the most complete).

If you have the budget (USD 399 per developer), you may want look at
BlackAdder from The Kompany. It uses the PyQt bindings for the Qt
toolkit, which I find to be a bit better than wxPython/wxWindows, a bit
more polished and consistent. The package includes the BlackAdder
editor, the QtDesigner, PyQt docs and a license to redistribute the PyQt
libraries for win32 (which is really what you're paying for - most of
this is available for free on GPL'ed systems).

Another option is to extend/embed Python with Delphi; specifically, use
Delphi for the GUI, and Python for the logic. There's some Delphi
bindings and documentation here:

http://membres.lycos.fr/marat/delphi/python.htm
http://www.atug.com/andypatterns/pythonDelphiTalk.htm
 
P

PT

What worries me is wxPython:
I'm also
unclear as to how easy custom controls are to build.

None of the Python GUI toolkits support making good custom controls as
well as Java and .NET do. TKinter is probably the best Python option
for that. If you are comfortable with Windows programming though,
wxPython will not be too difficult.
Am I just being confused by my newbie-ness, or are my initial concerns
justified? What's anybody else's experiences with gui programming in
wxPython like vs a RAD like Delphi or .NET?

If you want something similar to Delphi or .NET, then you would
probably like QT Designer much better than the wx options. See
BlackAdder (Win, $$) or eric3 (Linux, free):
http://www.thekompany.com/products/blackadder/
http://www.die-offenbachs.de/detlev/eric3.html

If money isn't an issue though, just stick with Visual Studio and C#
and let the other guy do most of the work.
 
J

Jarek Zgoda

James Goldwater said:
The target is Win32 for now (98 - XP). Now, if it were up to me, I'd use
Delphi - it's what I know best. But I'm working with a less experienced
developer with whom I have no languages in common. He's keen to get
started on C#, I've toyed with C# and though it looks easy, I don't see
any major gains over what I already know.

I love Delphi but I would choose Python for simplicity, flexibility and
library (will not mention that it works on AS/400, the best
minicomputer(!) ever made).

But I'm rather guerilla guy and mainstream makes me sick.

(NP: The Pogues - Sally MacLennane)
 
J

James Goldwater

It's not the RADdish-ness (is that a word?) - drag'n'drop, property
assignment etc - that concerns me, it's the ease of gui building - by
hand is fine (oh how I've come to 'love' Java's layout managers...)

Custom controls is the biggie then. I think I'll have a punt at building
a custom control in wxPython to see if it's even feasible. Anybody want
an arbitrary-angled triangular-wedge button? (My first custom control
in Delphi version 1, all those years back...)
None of the Python GUI toolkits support making good custom controls as
well as Java and .NET do. TKinter is probably the best Python option
for that. If you are comfortable with Windows programming though,
wxPython will not be too difficult.




If you want something similar to Delphi or .NET, then you would
probably like QT Designer much better than the wx options. See
BlackAdder (Win, $$) or eric3 (Linux, free):
http://www.thekompany.com/products/blackadder/
http://www.die-offenbachs.de/detlev/eric3.html

If money isn't an issue though, just stick with Visual Studio and C#
and let the other guy do most of the work.

--
James Goldwater
I.T. Consultant
020 8949 7927 (mobile 078 999 55 265)

GPG Key: A2137B98 (pgp.mit.edu)
 
J

John J. Lee

James Goldwater said:
It's not the RADdish-ness (is that a word?) - drag'n'drop, property
assignment etc - that concerns me, it's the ease of gui building - by
hand is fine (oh how I've come to 'love' Java's layout managers...)

I'll make my usual comment, which is that nobody has yet contradicted
me (unusual on USENET ;-) that Qt is the most well-designed Python GUI
framework. (Qt Designer is very good, too.)

And, strangely, the PyQt commercial license is far cheaper than (C++)
Qt. $400 for former (Blackadder, from theKompany.com), $2500-odd for
the latter!

(before somebody asks: no, you *don't* need both licenses -- only the
cheap one from theKompany, who have an agreement with trolltech)

I believe Blackadder comes with Python-specific docs for PyQt, but
they're actually completely redundant, IMHO -- it's trivial to
translate the C++ docs to Python code, using the list of exceptions
distributed with PyQt. Another BTW: their FAQ page still says
Blackadder is in beta, but I think somebody here mentioned the final
version was actually released some while back (PyQt itself has been
stable for years, of course).

Custom controls is the biggie then. I think I'll have a punt at
[...]

PyQt is certainly good at this.


John
 
J

Joe Francia

John said:
I'll make my usual comment, which is that nobody has yet contradicted
me (unusual on USENET ;-) that Qt is the most well-designed Python GUI
framework. (Qt Designer is very good, too.)

I'll second that, and go as far as to say it's a very good GUI framework
no matter how you speak to it.
And, strangely, the PyQt commercial license is far cheaper than (C++)
Qt. $400 for former (Blackadder, from theKompany.com), $2500-odd for
the latter!

$400 is for preofessional use. For personal use, it's $80, but you lose
the right to distribute your apps (but maybe not if you release them
under the GPL - I should look into that).
I believe Blackadder comes with Python-specific docs for PyQt, but
they're actually completely redundant, IMHO -- it's trivial to
translate the C++ docs to Python code, using the list of exceptions
distributed with PyQt.

You do get a copy of the docs with your BA purchase. The Kompany also
sells the PyQt docs separately for $20 for a one-time purchase, or $70
for a yearly subscription; that is, all updates for one year are included.

Another BTW: their FAQ page still says
Blackadder is in beta, but I think somebody here mentioned the final
version was actually released some while back (PyQt itself has been
stable for years, of course).

It is indeed stable. The one thing I don't like about BlackAdder is
BlackAdder itself, the editor portion. It's not terrible - it just
doesn't behave quite like I expect a dedicated Python editor to behave.
I usually create my GUI in the Qt Designer, and then edit the Python
stuff in Eric (Linux) or SciTE (win32).
 
J

Jarek Zgoda

?????? ? said:
Why is it the best minicomputer ever made?
I really want to know!

Since nobody ever produced any other. Only IBM produced machines that
can be called "midrange" (something between microcomputer and "real
computer", the famous S/390 mainframe). They still use this terminology.
 
S

Skip Montanaro

Jarek> Since nobody ever produced any other. Only IBM produced machines
Jarek> that can be called "midrange" (something between microcomputer
Jarek> and "real computer", the famous S/390 mainframe). They still use
Jarek> this terminology.

You seem to be forgetting (at least) DEC's VAX line of computers. Data
General and PR1ME had computers classed as "mini" computers also. I'm sure
there were others.

Skip
 
C

Cameron Laird

Since nobody ever produced any other. Only IBM produced machines that
can be called "midrange" (something between microcomputer and "real
computer", the famous S/390 mainframe). They still use this terminology.
.
.
.
Sneaky, Jarek; but there were a LOT of "minicomputer"
manufacturers, including DEC, Data General, HP, Prime,
....
 
C

Cousin Stanley

Why is it the best minicomputer ever made?
I really want to know!

| Since nobody ever produced any other.
| Only IBM produced machines that can be called "midrange"
| (something between microcomputer and "real computer",
| the famous S/390 mainframe). They still use this terminology.

Jarek ....

Honeywell also produced a line of mid-range machines
called the Level 6 minicomputers ....

These machines ran an operating system
which had an internal architecture
and command line interface different from,
but vaguely similar, to Multics, a Honeywell mainframe OS ....

Multics was a major predecessor of Unix,
a euphemism for Multics Without Balls
deemed so by the original developers themselves ....

Without Multics there might not be
any such thing as Unix or Linux ....

You can find the history of Multics at ....

http://www.multicians.org
 
M

MetalOne

I have recently been trying to build some GUIs with wxWindows. The
first problem that I ran across involved not being able to send and
event from a worker thread to the GUI thread and get the GUI thread to
process the event while the user had a menu pulled down. I wrote a
bug report and this has since been fixed. Tkinter has issues here
also. There is no means for a worker thread to put an event in the
GUI thread.

The second problem that I have run across is that tab order between
controls is the order that controls are added. You can't get tabbing
to skip a control. If you dynamically add/remove controls you can't
achieve your desired tab order.

wxWindows seems like a very impressive work. The demo is certainly
impressive. I also suppose I shouldn't rant to much about something
that is free. However my first two GUIs hit critical problems, and
these were really simple GUIs. Granted, the first problem has been
fixed now, and I have not yet written a bug report on the second.

Tkinter is also giving me problems. I have been trying to add
controls to a canvas and to have a scrollbar that will scroll the
controls on the canvas. I think I have it figured out now, but it is
damn near impossible to figure out from the documentation. I had to
scour the internet looking for solutions.

I have also played with displaying video in both wxWindows and Tk.
I have raw gray scale data simply as a list of values range 0-255.
Using PIL I can easily convert to a format wxWindows and Tk can
display. I get around 30 fps with wxWindows and 15 fps with Tk.
However, all images wxWindows displays must be full 24-bit color. If
the images didn't need to be expanded to (r,g,b) I would expect
signifcant speed up. I don't know why Tk is so much slower.

wxWindows and Tk are the only toolkits that wrap native Windows
controls. The others all emulate controls. I am thinking about
trying out another toolkit.
FOX, FLTK or GTK.

I am having enough trouble convincing people to use Python. I'd never
be able to get my work to purchase Qt. They would prefer to do
everything in VB6.
 
S

stephane ancelot

Hi,
I have recently evaluated wxpython because I am coming from fox (for 3 years)
, but fox lacks GUI designer and wxwindows with wxpython and boa-constructor
seems to solve the problem

Thanks for your advice in wxwindows.

If you want informations about fox I can help you.

Best Regards
steph


Le Vendredi 16 Janvier 2004 07:57, MetalOne a écrit :
 
D

Dennis Lee Bieber

Jarek Zgoda fed this fish to the penguins on Thursday 15 January 2004
10:12 am:

Since nobody ever produced any other. Only IBM produced machines that
can be called "midrange" (something between microcomputer and "real
computer", the famous S/390 mainframe). They still use this
terminology.

The late DEC might want to take you up on that... The VAX series was
commonly billed as a "super-Mini", not a mainframe, and definitely not
a micro. Micro's were the Altair, Ohio Scientific, Sphere, Apple-II,
TRS-80... Mainframes were IBM (360+), SDS/Xerox Sigma, Univac,
Burroughs...



--
 
E

Eric Brunel

MetalOne wrote:
[snip]
Tkinter has issues here
also. There is no means for a worker thread to put an event in the
GUI thread.

We've successively used the event_generate method on Tkinter widgets from worker
threads to communicate with the main thread. You can also have less
straightforward solutions involving the main thread regularly checking for a
Queue or Event (using the after method) to get events from the worker threads.
So you definitely can't say there's "no means" to do it. But it's clearly not as
easy as it should.

[snip]
Tkinter is also giving me problems. I have been trying to add
controls to a canvas and to have a scrollbar that will scroll the
controls on the canvas. I think I have it figured out now, but it is
damn near impossible to figure out from the documentation. I had to
scour the internet looking for solutions.

The documentation is clearly the main problem with Tkinter. It's not really that
there's not enough, but useful information must be gathered from too many places...

The best places are:
- For beginners, "Thinking in Tkinter" from Stephen Ferg:
http://www.ferg.org/thinking_in_tkinter/index.html
- Tkinter demos in the Python distribution: unfortunately one of Tkinter's best
kept secrets. Just go to <Python root>/Demo/tkinter and look at the scripts.
I've learnt a lot from them, even if they're far from perfect (where on earth
did they get the idea to make all their application inherit from Frame?!)
- "An introduction to Tkinter" from Fredrik Lundh:
http://www.pythonware.com/library/tkinter/introduction/index.htm - very useful,
but unfortunately incomplete...
- And finally the man pages for tcl/tk: http://www.tcl.tk/man/ - only useful
once you've practiced a bit, since you must know how to translate tcl/tk to
Python/Tkinter to be able to use it.

The book "Python and Tkinter programming" from John Grayson seems interesting,
but I never used it myself. You can get an idea of its contents and download the
example scripts here: http://www.manning.com/grayson/

HTH
 

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
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top