Uploaded code

From: Jan Karrman <jan_at_it_dot_uu_dot_se>
Date: Wed Oct 22 2003 - 09:11:48 CDT

I have uploaded my code to SourceForge now. You can check it out
with 'cvs checkout src'. To run the scripts, you need to set your
PYTHONPATH environment variable to include the src directory
where the code was downloaded. On Unix/Linux with something like:

   PYTHONPATH=/home/jan/voting-project/src; export PYTHONPATH
   setenv PYTHONPATH /home/jan/voting-project/src

depending on what shell you have. Under Windows I believe you can
set it via the Control Panel, or by editing AUTOEXEC.BAT on older

To use the code, you will also need to install the gnosis XML parser:


(should we upload this to SourceForge as well, to make it simpler to
get the code together?)

In the directory src/evm2003/test you will find two scripts that
generate a paper ballot: lp.py prints directly to a printer, and
ps.py writes postscript to a file.

There is also a sample file vote-selection.xml that is used by lp.py
and ps.py.

The script bva.py is a simple barcode vocalization machine.

You need to edit lp.py and bva.py to reflect your local environment;
see the comments within the scripts.

Here are the changes I have made to vote-selection.xml to get all
needed information:

In cast_ballot element, I added the attributes 'number' and 'precinct':

  <cast_ballot number="8545" precinct="2216"...>

To define the data for President and Vice President within the same
election element, I added the attribute 'coupled', and in selection
the attribute 'name':

    <election coupled="Yes" name="Presidency"...>
      <selection name="President"...>Rachel Carson</selection>
      <selection name="Vice President"...>John Muir</selection>

Since I have written the votes2digits() function myself now, I do not
longer use the previously suggested barcodedata element.

I know there are several Python wizards in the project - please note
that this is the first Python code I have ever written :-)

Looking forward to seeing more code uploaded soon...

= The content of this message, with the exception of any external
= quotations under fair use, are released to the Public Domain
Received on Fri Oct 31 23:17:03 2003

This archive was generated by hypermail 2.1.8 : Fri Oct 31 2003 - 23:17:07 CST