Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 13 lines (8 sloc) 2.63 KB
#!/usr/bin/python3
import sys
oneRow = '<tr id="row%d"><td><select onchange="return updateInnings(%d, this.selectedIndex);" name="inning%d" id="inning%d"><option value="V1">Visitor 1</option><option value="H1">Home 1</option><option value="V2">Visitor 2</option><option value="H2">Home 2</option><option value="V3">Visitor 3</option><option value="H3">Home 3</option><option value="V4">Visitor 4</option><option value="H4">Home 4</option><option value="V5">Visitor 5</option><option value="H5">Home 5</option><option value="V6">Visitor 6</option><option value="H6">Home 6</option><option value="V7">Visitor 7</option><option value="H7">Home 7</option><option value="V8">Visitor 8</option><option value="H8">Home 8</option><option value="V9">Visitor 9</option><option value="H9">Home 9</option><option value="V10">Visitor 10</option><option value="H10">Home 10</option><option value="V11">Visitor 11</option><option value="H11">Home 11</option><option value="V12">Visitor 12</option><option value="H12">Home 12</option><option value="V13">Visitor 13</option><option value="H13">Home 13</option><option value="V14">Visitor 14</option><option value="H14">Home 14</option><option value="V15">Visitor 15</option><option value="H15">Home 15</option></select></td><td><select name="outs%d" id="outs%d" onchange="return updateOuts(%d, this.selectedIndex);"><option value="0">0</option><option value="1">1</option><option value="2">2</option></select></td><td><select name="runner%d" id="runner%d" onchange="return updateRunners(%d, this.selectedIndex);"><option value="1">none</option><option value="2">1st</option><option value="3">2nd</option><option value="4">1st &amp; 2nd</option><option value="5">3rd</option><option value="6">1st &amp; 3rd</option><option value="7">2nd &amp; 3rd</option><option value="8">loaded</option></select></td><td><select name="score%d" id="score%d" onchange="return updateScore(%d, this.selectedIndex);"><option value="-8">-8</option><option value="-7">-7</option><option value="-6">-6</option><option value="-5">-5</option><option value="-4">-4</option><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option></select></td><td><input name="situation%d" value="Last situation" type="submit"></td></tr>'
def generateRows(numRows):
for i in range(0, numRows):
print(oneRow % tuple([i] * 14))
if (__name__ == '__main__'):
generateRows(int(sys.argv[1]))
You can’t perform that action at this time.