Pvote: the code

The most recent version of Pvote is 1.0 beta. You can browse the source code here. The same source code is formatted for printing, with detailed explanatory notes, as Appendix B of the dissertation.

Pvote is free software under the GNU General Public License. I am open to considering other open source licenses; if you would like to use Pvote under a different license, please contact me using the address at the bottom of this page.

To run Pvote, you will need:

Unzip both archives (Pvote and the ballot definition) in the same directory. Then, in that directory, run demo.py. Press Esc to quit.

(demo.py is a slightly modified version of main.py, the Pvote main module. Whereas main.py is exactly the code that was reviewed in the Pvote software review, demo.py is modified so you can quit by pressing Esc and so that it works on Windows.)

The audio instructions in this sample ballot tell you to press number keys from 0 to 9 on a telephone-style numeric keypad. These keys on the keyboard are used to simulate the arrangement on a telephone-style keypad:

1
press 7
2
press 8
3
press 9
4
press U
5
press I
6
press O
7
press J
8
press K
9
press L
0
press ,

Revision history

The ballot definition format has changed from version to version, so each release of Pvote only works with a ballot definition that corresponds to that version. In earlier sample ballot definitions, fewer features are exercised and the audio is incomplete; the latest ballot definition includes two single-selection contests, one multi-selection contest, and two propositions from an actual ballot for the November 2006 election (ballot style #167 in Contra Costa County).

There are two ballot definitions provided for Pvote 1.0 beta. The first is exactly the ballot definition described in Appendix C of the dissertation. However, for some contests in this ballot definition, the touchscreen interface doesn't provide a way for the voter to abstain after having made a selection in the contest (thanks to Lenny Domnitser for pointing this out). In the second ballot definition, touching a selected option always deselects it.

Release date Version Output module Sample ballot definition
2007-03-29 Pvote 1.0 beta (15 kb) ballot printer ballot definition 1 (16.7 Mb, video + audio)
ballot definition 2 (16.7 Mb, video + audio)
2007-03-15 Pvote 1.0 alpha (6 kb) ballot printer ballot definition (16.7 Mb, video + audio)
2007-02-15 Pvote 0.9 (31 kb) paperless DRE ballot definition (59.1 Mb, video + audio)
2007-02-12 Pvote 0.8 (25 kb) paperless DRE ballot definition (18.8 Mb, video + audio)
2007-02-11 Pvote 0.7 (23 kb) paperless DRE ballot definition (7.7 Mb, video + audio)
2007-01-30 Pvote 0.6 (5 kb) paperless DRE ballot definition (9.5 Mb, video + audio)
2007-11-22 Pvote 0.5.1 (Ptouch) (5 kb) paperless DRE ballot definition (386 kb, video only)
2006-12-24 Pvote 0.5 (5 kb) paperless DRE ballot definition (386 kb, video only)
2006-07-31 Pvote 0.4 (5 kb) paperless DRE ballot definition (383 kb, video only)

Ballot definition tools

The ballotio module lets you read, manipulate, and write ballot definition files using the interactive Python interpreter. The file is loaded into an in-memory data structure which you can then examine and modify with ordinary Python commands. This module reads and writes ballot definition files corresponding to Pvote 1.0 beta.

Download ballotio.py (12 kb).