From jason at peaceworks.ca  Tue Nov 27 15:17:33 2007
From: jason at peaceworks.ca (Jason Hildebrand)
Date: Tue, 27 Nov 2007 15:17:33 -0500 (EST)
Subject: [Python Wpg] tomorrow night's meeting: miscellaneous stuff
Message-ID: <27410279.3021196194653374.JavaMail.root@zimbra>

Hi folks,

I'm scheduled to present tomorrow night (Wednesday).  I plan to do a grab-bag approach and spend a short time talking about each of the following topics (or a subset of them, depending on how things work out):
  * virtualenv
  * nose (testing framework)
  * optparse
  * reportlab

I hope to have a short example on each one.

peace,
Jason

--
Jason Hildebrand
PeaceWorks Computer Consulting
#2 - 396 Assiniboine Ave, Winnipeg
204 480 0314   --or--   519 725 7875, ext 620.



From high.res.mike at gmail.com  Wed Nov 28 17:24:23 2007
From: high.res.mike at gmail.com (Mike Pfaiffer)
Date: Wed, 28 Nov 2007 16:24:23 -0600
Subject: [Python Wpg] version 2.0 for door prizes
Message-ID: <474DEA97.2050805@gmail.com>

	It's small and I had a suggestion to take care of the exception where 
there were more prizes than names. Here is the new code.

				Later
				Mike

*************************
# This program distributes door prizes for clubs

# Import modules as needed
import random

# Seed random number generator
random.seed()

# Print introductory message
print """Door prize distribution program:

This program will distribute a number of door prizes to all people who
enter their names in to this program. The program presumes no errors
in data entry.

Note: to collect the prize the person must actually be present.

The first step is to enter the prizes and the second is to enter the names
of the people participating in the draw. The third will be the actual draw.

"""

# Enter prizes
prize_count = -1
print "Enter prize list. Terminate with 'end'."
print
prize = ''
while (prize != 'end'):
      prize = raw_input('Prize --> ')
      if prize != 'end':
           prize_count = prize_count + 1
           if prize_count == 0:
                prize_list = [prize]
           else:
                prize_list = prize_list + [prize]
      else:
           print "Prize entry terminated."
           print

# List prizes
print "Prize list:"
for counter in range(prize_count + 1):
      print prize_list[counter]
print

# Enter names
name_count = -1
no_prize = 'no prize'
print "Enter names. Terminate with 'end'."
print
name = ''
while name != 'end':
      name = raw_input('Name --> ')
      if name != 'end':
           name_count = name_count + 1
           template = [name, no_prize]
           if name_count == 0:
                name_list = [template]
           else:
                name_list = name_list + [template]
      else:
           print "Name entry terminated."
           print

# List names
print "Name list:"
for counter in range(name_count + 1):
      print name_list[counter][0]
print

# More prizes than names
if name_count < prize_count:
      name = 'Redraw'
      extra_prizes = prize_count - name_count
      for counter in range(extra_prizes):
           template = [name, no_prize]
           name_list = name_list + [template]
      name_count = prize_count

# Award prizes
print "The prizes go to..."
for counter in range(prize_count + 1):
      award = int(random.random() * (name_count + 1))
      while name_list[award][1] != no_prize:
           award = int(random.random() * (name_count + 1))
      name_list[award][1] = prize_list[counter]

# Display results
for counter in range(name_count + 1):
      print name_list[counter]


From ptriggs at mts.net  Wed Nov 28 18:47:03 2007
From: ptriggs at mts.net (Peter Triggs)
Date: Wed, 28 Nov 2007 17:47:03 -0600
Subject: [Python Wpg] Tonight's Meeting
Message-ID: <001401c83218$fa5d6dd0$f4a2fea9@OldBetsy>

To All,

Sorry, I'm not going to be able to make it tonight.

See you in the new year.

Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/winnipeg/attachments/20071128/3a6056a4/attachment.html>

From syd at plug.ca  Thu Nov 29 10:43:00 2007
From: syd at plug.ca (Sydney Weidman)
Date: Thu, 29 Nov 2007 09:43:00 -0600
Subject: [Python Wpg] Tutorial link and apologies about lack of proper vi
	installation
Message-ID: <1196350980.7642.8.camel@sweidman-laptop>

Here was the tutorial on nose which I peeked at before last night's
meeting:

http://ivory.idyll.org/articles/advanced-swc/nose-intro.html

Also:

Ubuntu doesn't (by default) install most of vim, so I had to install:

vim-runtime
vim
vim-doc
vim-gui-common
vim-gnome
vim-python

So anyone using my laptop for a demo can be assured that vim will have
":syn on" available.

Have a great holiday season, all!

See you in the new year.

Regards,
Syd