I quickly made this random draw generator one day because I got tired of drawing names out of a hat.

This program allows for random assignment of 1 value to another. This would most often be used to assign one person to give a gift to another.

The two functions that acutally mix the names up are in the file backEnd.py.  You simply feed a list of names into the function randomize. textBased.py allows names to be entered and then mixed once. When entering names, an empty name will tell the program to proceed to mixing the names. gui.py offers the functionality of textBased.py, but it also allows names to be remixed without re-entering them. This lets you, fine tune, the results until you find something of your liking.

Here is a screenshot of gui.py when it first starts:
A picture of gui.py when it first opens

Names have been added, but not yet mixed:
Names added to gui.py, but not yet mixed.

Names have been mixed:
"gui.py". Names have been mixed.
I agree, the pattern is obvious, However it works well enough.

  • Automatically capitalizes input.
  • Does not allow duplicate names.
  • backEnd.py   ----    Necessary for all files
  • textBased.py  ----    Text based version.
  • gui.py             ----    Graphic User Interface version. Requires wxPython