#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    35
    Rep Power
    12

    simple, full wxPython examples?


    Hi all,

    In an effort to learn wxPython, I'm trying to make a very simple chat program. Two textboxes: The top one you can type stuff into, click a "send" button, and have it sent to the user you are connected to. The bottom one displays messages you receive from the other user.

    So I'm thinking that there are two threads that need to be created -- one that is responsible for handling the GUI, and another that handles sending/receiving data over a socket (passing data to/from the GUI thread, when the user receives a message or sends one, respectively). I suppose I could just start attempting to code it right away, but I'd like a prototype to sort of guide me.

    So does anyone know of a simple program using wxPython and sockets that might help me out?

    Thanks,
    theperfectsoup
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Have you had a look though the examples that come with wxPython? There all very fun and generally entertaining; i dont know if there are any using sockets but worth a look

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    35
    Rep Power
    12
    Originally posted by netytan
    Have you had a look though the examples that come with wxPython? There all very fun and generally entertaining
    Yeah, the problem is that they're just little code snippets that teach you how to do certain things -- a popup message, a textbox, etc. But it doesn't really teach you how to run multiple threads in a GUI, how to interface between the GUI and a more substantial underlying program using sockets, etc.

    Oh well. Starting to mess around with it -- hopefully it won't be hard to learn.

    - tps

IMN logo majestic logo threadwatch logo seochat tools logo