Name: [16797] Tim Bower
Member: 8 months
Authored: 8 videos
Description: Assistant Professor Computer Systems Technology Kansas State University at Salina `Tim Bower <http://www.sal.ksu.edu/faculty/tim/>`_ My blog: `Open Source on the Prairie <http://prairiepy.blogspot.com/>`_ ...

[1548] Code Review of multi-party graphical chat client (2/4)

in series: Python Network Programming

video tutorial by Tim Bower

(Showmedo is undergoing major changes. To report any problems viewing the videos please email us and include browser and OS specifics. Cheers - Kyran.)

In this video I review the source code for the multi-party graphical chat client. This a multi-threaded wxPython program.

I show how to when to use the wx.CallAfter() function, which is called by a different thread than the wxPython graphics thread to generate a wxPython event and send an optional message to alert the graphical program of some external event.

A sub-class of threading.Thread is used to invoke the thread that does the network communication. We also use a little bit of locking with the threading.Lock() object to coordinate a shared queue (a list) between the two thread.

We also show how to establish a client side socket connection to a server.

More discussion about this program and more Python network programming topics can be found on my Network Programming Study Guide

Here is a link to the specific page in the Study Guide where all the source code can be downloaded from.

Video Tutorials related by tag:

wxpython threads sockets python networkprogramming guiprogramming.

Got any questions?

Get answers in the ShowMeDo Learners Google Group.

Video statistics:

  • Video's rank shown in the most popular listing
  • Video plays: 121 (since July 30th)
  • Plays in last week: 5
  • Published: 6 months ago

Thank-yous, questions and comments

If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?

You may also want to see our ShowMeDo Google Group to speak to our active users and authors.

Please provide your email address (won't be published)

Really nice and useful. I'm looking forward to seeing the rest of the series.


Thanks, great tutorial. Looking forward to the rest of the series.


Nice code walkthrough. For intermediate+ Pythonistas there are some useful code-pointers, but even beginners should appreciate seeing the skeleton of a client-server app. Thread-locking is a pretty vital area these days, so v. nice to see the basics covered. Personally I picked up a lot in a very short space of time. Little things like the thread-lock being specified in seconds, not milliseconds stand out. Anyway, these sort of code walkthroughs are a great way to learn and offer fascinating insights into the various ways we approach programming problems.


Kudos and Thanks for Tim

Learn Python the easy way!
If you want to learn the Python programming language from a very gentle start or are looking to increase your ability to do cool things with Python, check out our club
View this series as a one-page learning-path
This feature is for club members. Click here to find out more.
Your email address will not be published.

Show some quick comments >>








By the Same Author

Tim Bower Videos related to the production of educational screencast video.
Tim Bower Videos about how to use Unix / Linux. Emphasis will be on entering commands at the shell [...]