wxPython worries

Discussion in 'Python' started by James Goldwater, Jan 14, 2004.

  1. 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.
    James Goldwater, Jan 14, 2004
    #1
    1. Advertising

  2. James Goldwater

    Guyon Morée Guest

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


    "James Goldwater" <> wrote in message
    news:...
    > 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.
    >
    >
    Guyon Morée, Jan 14, 2004
    #2
    1. Advertising

  3. James Goldwater

    Lars Heuer Guest

    Lars Heuer, Jan 14, 2004
    #3
  4. James Goldwater

    Lars Heuer Guest

    Hello again,

    Forgot to mention SPE (uses the mentioned wxGlade):
    http://spe.pycs.net/

    Maybe this tool is more "IDE"-like. ;)

    Regards,
    Lars
    Lars Heuer, Jan 14, 2004
    #4
  5. James Goldwater

    Joe Francia Guest

    James Goldwater wrote:
    > 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
    Joe Francia, Jan 14, 2004
    #5
  6. James Goldwater

    PT Guest

    > 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.
    PT, Jan 14, 2004
    #6
  7. James Goldwater

    Jarek Zgoda Guest

    James Goldwater <> pisze:

    > 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)

    --
    Jarek Zgoda
    Unregistered Linux User #-1
    http://www.zgoda.biz/ JID:zgoda-a-chrome.pl http://zgoda.jogger.pl/
    Jarek Zgoda, Jan 14, 2004
    #7
  8. 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...)

    PT wrote:
    >>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.


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

    GPG Key: A2137B98 (pgp.mit.edu)
    James Goldwater, Jan 14, 2004
    #8
  9. [OT] AS/400


    > (will not mention that it works on AS/400, the best
    > minicomputer(!) ever made).


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


    --
    Дамјан (jabberID:)

    To boldly go where I surely don't belong.
    =?UTF-8?B?0LTQsNC80ZjQsNC9INCzLg==?=, Jan 14, 2004
    #9
  10. James Goldwater

    John J. Lee Guest

    James Goldwater <> writes:

    > 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
    John J. Lee, Jan 15, 2004
    #10
  11. James Goldwater

    Joe Francia Guest

    John J. Lee wrote:
    > 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).
    Joe Francia, Jan 15, 2004
    #11
  12. James Goldwater

    Jarek Zgoda Guest

    Re: [OT] AS/400

    ?????? ? <> pisze:

    >> (will not mention that it works on AS/400, the best
    >> minicomputer(!) ever made).

    >
    > 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 Zgoda
    Unregistered Linux User #-1
    http://www.zgoda.biz/ JID:zgoda-a-chrome.pl http://zgoda.jogger.pl/
    Jarek Zgoda, Jan 15, 2004
    #12
  13. Re: [OT] AS/400


    >>> (will not mention that it works on AS/400, the best minicomputer(!)
    >>> ever made).

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


    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
    Skip Montanaro, Jan 15, 2004
    #13
  14. Re: [OT] AS/400

    In article <bu6l68$8uv$>,
    Jarek Zgoda <> wrote:
    >?????? ? <> pisze:
    >
    >>> (will not mention that it works on AS/400, the best
    >>> minicomputer(!) ever made).

    >>
    >> 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.

    .
    .
    .
    Sneaky, Jarek; but there were a LOT of "minicomputer"
    manufacturers, including DEC, Data General, HP, Prime,
    ....
    --

    Cameron Laird <>
    Business: http://www.Phaseit.net
    Cameron Laird, Jan 15, 2004
    #14
  15. Re: [OT] AS/400

    > 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

    --
    Cousin Stanley
    Human Being
    Phoenix, Arizona
    Cousin Stanley, Jan 15, 2004
    #15
  16. James Goldwater

    Robert Guest

    What is needed is a good "Programming wxPython"!
    Robert, Jan 16, 2004
    #16
  17. James Goldwater

    MetalOne Guest

    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.
    MetalOne, Jan 16, 2004
    #17
  18. 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 :
    > 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.
    stephane ancelot, Jan 16, 2004
    #18
  19. Re: [OT] AS/400

    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...



    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Bestiaria Home Page: http://www.beastie.dm.net/ <
    > Home Page: http://www.dm.net/~wulfraed/ <
    Dennis Lee Bieber, Jan 16, 2004
    #19
  20. James Goldwater

    Eric Brunel Guest

    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
    --
    - Eric Brunel <eric dot brunel at pragmadev dot com> -
    PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com
    Eric Brunel, Jan 16, 2004
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. i18n worries

    , Jul 2, 2003, in forum: Python
    Replies:
    0
    Views:
    360
  2. CSUIDL PROGRAMMEr

    Regular expression worries

    CSUIDL PROGRAMMEr, Oct 11, 2006, in forum: Python
    Replies:
    3
    Views:
    269
    Tim Chase
    Oct 11, 2006
  3. Replies:
    16
    Views:
    721
    Stephen Sprunk
    Jul 24, 2006
  4. Replies:
    8
    Views:
    316
    Andrew Thompson
    Mar 25, 2007
  5. Replies:
    0
    Views:
    285
Loading...

Share This Page