Re: [OVC-demo-team] Connecting GUI with print output

From: Jan Karrman <jan_at_it_dot_uu_dot_se>
Date: Sun Feb 22 2004 - 11:54:07 CST

On Thu, 19 Feb 2004, I wrote:

> On Thu, 19 Feb 2004, John-Paul Gignac wrote:
>
> > It also seems to expect a particular set of contests
> > rather than an arbitrary set. I've attached a sample output file for
> > your reference.
> >
>
> Yes, it requires that both the names of the contests, and the names of
> the candidates, are given _exactly_ as they are in the file rii/data.py.

I have moved this file to data/contests.py now. But I believe the simplest
way to generate the XML file now is to follow the sample below.

You need to build two lists:

  votes - has 13 elements, one for each contest. The first 11 are integers,
  where a zero means that no preference was indicated. A number one means
  the first candidate etc. A write-in candidate is indicated with a number
  one greater than the number of candidates in that contest. The last two
  elements are lists of integers (having the same meaning). An empty list
  means that no preference was indicated.

  writeins - a list of write-in names. Note that the first is a list since
  there are two names needed for the presidential election.

/Jan

from evm2003.utils.getxml import ballotxml

country = "US"
state = "CA"
county = "Santa Clara County"
ballot_number = 1234
precinct = 2216
date = 20041104
serial = 234
votes = [1, 0, 3, 1, 0, 1, 0, 0, 0, 1, 1, [2, 6, 10], [8, 3, 4]]
writeins = [['', ''], '', 'Goofy', '', '', '', '', '', '', '', '', 'Donald Duck', 'Mickey Mouse']
xml = ballotxml(date, country, state, county, ballot_number, precinct, serial, "voting_machine", votes, writeins)
==================================================================
= The content of this message, with the exception of any external
= quotations under fair use, are released to the Public Domain
==================================================================
Received on Thu Apr 1 02:40:20 2004

This archive was generated by hypermail 2.1.8 : Thu Apr 01 2004 - 02:40:36 CST