Visual Components' Community

New Thinking for Factory Simulation
Welcome to Visual Components' Community Sign in | Help
in Search

Building GUI applications with wxPython

Last post ma, loka 12 2009 10:32 by Janne. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • to, loka 8 2009 9:27

    • harizon9
    • Top 10 Contributor
    • Joined on pe, helmi 22 2008
    • Kalmar
    • Posts 6

    Building GUI applications with wxPython

     Hello,

     Have any one tried to build a GUI application with wxPython? I need to build a GUI application and as TkInter is missing a GUI builder (... or is there any?), I think wxPython is a good option.

     Thank you.

    Harry

    Hari Nidamarthy
  • pe, loka 9 2009 15:49 In reply to

    • Janne
    • Top 10 Contributor
    • Joined on pe, helmi 22 2008
    • Visual Components HQ
    • Posts 21

    Re: Building GUI applications with wxPython

    Well the python in internal use is a bit peculiar, its a stackless python interpreter and the version is a bit old (2.2). So if you can overcome the hurdles of sidestepping threaded functionality inside python and find a wxPython library that supports a python 2.2 then i dont really see any problems with this. So while theres nothing wrong with vxPython itself getting it to work might be a bigger job than actually building the GUI without a GUI builder.

    So far haven't heard of anybody that has tried.  If you get it to work then please post your experience. If it was me i would instead try to use pyQT tough the chances of getting it to work are very slim (which is why im postponing this until 2010 comes out). Good luck.

    You might want to use a com server instead, In which case it doesn't really matter whether or not you use a external python interpreter or not. But then you can not use the python api, but must use the com api instead. Adding one layer of complexity to you. Tough granted you get the chance to tie it even better with the existing gui.This has the added advantage of you being able to use .NET which can be a bit easier for you to deploy.

     >> (... or is there any?)

    http://www.bitflipper.ca/rapyd/

  • pe, loka 9 2009 18:36 In reply to

    • krotta
    • Top 25 Contributor
    • Joined on pe, helmi 22 2008
    • Kuopio, Finland
    • Posts 5

    Re: Building GUI applications with wxPython

    I don't know about GUI builders but building simple forms and functions with Tkinter seemed to work when I tested it briefly few months ago. Needless to say VC was a bit unstable when playing around with Tkinter in PythonScript behaviours but i'm sure that's no news to anyone.

    Before I resigned to use Tkinter I tried to get wxPython and PyQT to work with VC but that never happened. Reason I tried those first was that (to my knowledge) Tkinter lacks some common features like combo-boxes.

    However, since I was able to construct "basic forms" quite easily with Tkinter I'll probably test it out more extensively in the future when I have more time to put into it. I can post the simple example (form with editbox and some buttons) that I created with Tkinter if someone is interested.

     


  • ma, loka 12 2009 8:21 In reply to

    • harizon9
    • Top 10 Contributor
    • Joined on pe, helmi 22 2008
    • Kalmar
    • Posts 6

    Re: Building GUI applications with wxPython

    Is it possible to write an 'Add-on' application that runs on 3D Realize 2007 using COM?I thougt it COM applications runs with 3D Create. I might be wrong here ...

    Hari Nidamarthy
  • ma, loka 12 2009 10:32 In reply to

    • Janne
    • Top 10 Contributor
    • Joined on pe, helmi 22 2008
    • Visual Components HQ
    • Posts 21

    Re: Building GUI applications with wxPython

    >>  Needless to say VC was a bit unstable when playing around with Tkinter in PythonScript behaviours but i'm sure that's no news to anyone.

     

     Its the simple fact that the python interpretter does not run the way a normal python does, it runs in special stackless mode. So you would need to write the code in a bit uinituitive manner. Which unfortunately is not documented in most python tutorials or examples. This simple fact makes avenues of normal operation unworking because the gui frameworks tend rely on threads. And a stackless python has no thereads so to speak. 

     So all avenues relying on thereds implicitly or excplicitly will fail, This leads to the feeling its unstable, because they will simply not work normally. This said the 2010 release is running on python 2.5 which should make life a bit easeier in this regard. This is also the reason why I dont feel comfortable writing examples ate the moment because i should test them 2 times over. But since the new system is not up and running I must postpone such things till next week.  Also there might be a much easier way to make dialogs, but that is only if it works well enough.

     But i was intending on testing operation fo Qt in 2010 on my own time.

     >> Is it possible to write an 'Add-on' application that runs on 3D Realize 2007 using COM?

     No, and its not really intended for this kind of use unfortunately.

Page 1 of 1 (5 items)