wxPython Programming Tutorial – 1 – Creating a Basic Frame

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

33 responses to “wxPython Programming Tutorial – 1 – Creating a Basic Frame”

  1. Fazil Shah Avatar

    when I run this code a window pops but freezes and doesn't respond! any suggestions?

  2. ehud eliav Avatar

    Hi
    Tutorials 15 –> End are missing
    can you fix this pls?

  3. Dorian McCarthy Avatar

    "Thats life, just deal with it" – no reason to be a prick, so don't.

  4. Jordan Fischer Avatar

    Unity should implement Python support. That would be the greatest thing ever…

  5. Khaled Kimboo Avatar

    Window is the host handled by the OS, to embedded the Frame,

  6. q zorn Avatar

    ok stuff. thanks.

  7. toxicsoldier Avatar

    hey i'm having a problem, no matter what i keep getting a "self" is not defined error

  8. stephan guo Avatar

    Does anyone crash or have an unresponsive frame when you run it? 
    what i wrote was:

     import wx

    class wxpython(wx.Frame):

        def _init_(self, parent, id):
            wx.Frame.__init__(self, parent, id, 'Window', size=(1000,900))

    if _name_=="__main__":
        app=wx.App(False)
        frame=wxpython(parent=None, id=-1)
        frame.Show()
        app.MainLoop
            

  9. shane watson Avatar

    PLease help … i have written this program and getting the below error
    import wx

    class bucky(wx.Frame):
        def _init_(self, parent,id):

            wx.Frame.__init__(self, parent, id, 'Frame aka window', size = (300,200))

    if _name_== "__main__":
        app = wx.PySimpleApp()

        frame = bucky(parent= None, id = -1)
        frame.Show()
        app.MainLoop() 

    I am getting this error … please help

    Traceback (most recent call last):
      File "C:/Python26/frame.py", line 10, in <module>
        app = wx.PySimpleApp()
      File "C:Python26libsite-packageswx-3.0-mswwxcore.py", line 90, in __init_
        wxPyDeprecationWarning, stacklevel=2)
      File "C:Python26libwarnings.py", line 29, in _show_warning
        file.write(formatwarning(message, category, filename, lineno, line))
    TypeError: idle_formatwarning_subproc() takes exactly 4 arguments (5 given)

  10. Z Avatar

    Where's the link to installing wx Python?????

  11. Nick H Avatar

    I can't find the link. And just to be clear this isn't the same thing as the shell that the other python tutorial was in right?

  12. karugahe ruvic Avatar

    hey bucky thank you very much. you are making smarter
     

  13. Kylianos Mc Avatar

    hey bucky, or anybudzz,  could you tell me why i get error in running the code of showing the app and misc stufffftf..wwwie?

  14. punjabiexplorer Avatar

    Similarly for wx.__init__ <– How do we know what parameters are allowed? Do we check the reference of this method somewhere? Is it documented?

  15. punjabiexplorer Avatar

    How do I know what parameters go into self? I mean you put parent and id …. how to determine what are eligible choices for a parameter?

  16. Maurice Dennis Avatar

    2009 ok …heute mache ich das mit wxglade

  17. Abhinav Nath Gupta Avatar

    Hey bucky, how do you configure wxpython 2.7 to work with python 33

  18. Credible Mulk Avatar

    depending on what version of wx you have, you may get an error about deprecated class:

    Warning (from warnings module):
      File "C:Python27x64mj_WxGuiWindow.py", line 9
        app = wx.PySimpleApp()
    wxPyDeprecationWarning: Using deprecated class PySimpleApp.

    so, to save you from distress or jumping out a window, just use :

    app = wx.App(False)

    instead of:

    app = wx.PySimpleApp()

  19. Ashraful Islam Avatar

    Hi bucky, Would this GUI run on Ubuntu too?

  20. Nathalee Allen Avatar

    hi bucky,thanks for all ur python tutorial so far it has be a great help!!!!! is it possible for you to teach us how to make a game like hangman or build a tree. I got that for course work…. plz help

  21. F22Acura Avatar

    Would you do some bash tutorials for Linux?
    Would be greatly appreciated.
    Like So he can see.

  22. Gang Zhao Avatar

    it's basically a redefined function (method) of its father calss' __init__ method.

  23. Hugo Genesse Avatar

    You should always add the path to python : #!/usr/bin/python at the beginning of your code

  24. Cosmik Debris Avatar

    A big thanks to a guy called Mark Brenner on here. I typed in his code and it worked…

    Phew! It was starting to drive me INSANE!!!

  25. Shockszzbyyous Avatar

    wouldn't matter i think, although pygame is made for making games and the libraries its based under and the python modules for it are written in C, so pygame probably runs faster.

  26. Cosmik Debris Avatar

    After loads of messing about I finally got it to work.

    Unfortunately I'm getting this error now…

    AttributeError: 'module' object has no attribute 'Frame'

  27. Cosmik Debris Avatar

    Don't computers drive you CRAZY!

    I uninstalled and then reinstalled Python to try and fix the black text problem.

    Anyway, it turned out that I wasn't saving my programs with .py.

    But, now I can't get pxpython to work!

    I've tried to install it several times but no luck. Firstly it's telling me that it can't find Python in the registry. And then it's telling me that it can't find the program etc.

    Any ideas???

  28. Cosmik Debris Avatar

    Something really strange is happening.

    Before I run a program it's in beautiful colours. Then it all turns black.

    Any help would be much appreciated.

  29. Cosmik Debris Avatar

    When I'm writing code in a new window, it's all black.

    Can anybody tell me how to make the keywords different colours.

  30. Kostas Nikolouts Avatar

    I want help it says me an error..:/
    import wx

  31. FRANK OSEH Joseph Avatar

    just subscribed… i do like your tutorials, pretty funny and cool. please more tips and advanced tutorial on WXPYTHON. thanks

  32. Christian Charry Avatar

    thanks man, been following up all the way from python tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *