Unfortunately there's another wrinkle: Python uses backslashes as escape characters in literal strings, so even so innocuous a change as using "\results\" instead of "\results\" has very strange effects -- you can get carriage returns (\r), tabs (\t), newlines (\n) and so on in the middle of your strings, replacing your perfectly good letters.
It's generally better to just stick with the forward slashes, actually -- Windows can handle those just fine, as long as there isn't one at the very beginning of the path before the drive letter!
Here's what I got when I ran the script, by the way -- I added a reaction number and sorted by X and Y:
Code: Select all
X Y gliderlist Reaction#
-29 -19 [-5,-7,5,-6,-16,-1,-26] 85
-26 -4 [-5,-14,3,5,9,-14,-20] 63
-25 -15 [4,1,13,2,-8,7,-18] 140
-25 -13 [-5,-12,-14,-13,-4,-18,-17] 65
-23 -14 [-5,-12,-9,-14,-8,-18,2] 71
-22 -17 [-6,-6,-8,-10,-4,-19,-18] 33
-22 -8 [-5,6,-18,-18,-25,-20,-14] 104
-22 0 [4,-6,11,13,17,-6,-12] 118
-21 -16 [5,-4,-6,-8,-2,-17,-16] 168
-21 -9 [4,-4,-6,-5,4,-10,-9] 120
-21 6 [-5,-12,-9,-14,-8,-40,2] 70
-20 -18 [-5,-7,-9,-3,-18,-17] 7
-20 -2 [-5,-7,-14,-18,-5,-4,6] 75
-19 -10 [4,-4,-1,-6,0,-10,10] 126
-18 -13 [-6,3,0,-2,4,-11,-10] 46
-18 -4 [4,14,-10,-10,-17,-12,-6] 158
-17 -12 [5,5,2,0,6,-9,-8] 181
-17 10 [4,-4,-1,-6,0,-32,10] 125
-16 -15 [-5,3,3,4,6,-15,-10] 100
-16 -14 [4,1,-1,5,-10,-9] 20
-16 -10 [-5,-12,1,-1,-1,6,-13] 73
-16 -9 [-5,1,-4,2,1,10,-4] 91
-16 2 [4,1,-6,-10,3,4,14] 130
-15 -16 [-5,-12,-11,-2,-5,1,-10] 68
-14 -20 [-6,-6,-13,-15,-14,5,-4] 30
-14 -11 [-6,-6,-15,-11,-6,-5,5] 28
-14 2 [-6,-6,-8,4,1,-8,-5] 37
-13 -19 [5,-4,-11,-13,-12,7,-2] 165
-13 -10 [-5,-7,5,-9,-13,-14,-1] 84
-13 -10 [5,-4,-13,-9,-4,-3,7] 163
-13 3 [5,-4,-6,6,3,-6,-3] 172
-12 -21 [-5,-12,-14,-13,6,-3] 4
-12 -14 [-5,-12,-14,6,-20,-33,-5] 66
-12 -12 [-5,-14,-10,-5,-4,6] 2
-12 -11 [4,11,11,12,14,-7,-2] 154
-12 -10 [-5,-7,-9,-18,-20,-15,-12] 80
-12 -6 [4,-4,9,7,7,14,-5] 128
-12 -5 [-5,-14,-10,-5,-11,-24,4] 60
-12 0 [-5,1,0,9,-1,5,-11] 94
-12 1 [-5,-7,5,2,-7,-4] 11
-12 5 [-5,-15,10,8,15,27,22] 56
-12 5 [-5,-15,19,16,23,35,30] 59
-12 8 [-5,1,0,1,12,-7,4] 93
-11 -12 [-5,6,-6,-8,-1,11,6] 105
-11 -12 [-5,6,3,0,7,19,14] 106
-11 -12 [4,-4,-3,6,3,9,-2] 123
-10 -23 [-6,-6,-8,-10,-4,-22,-12] 32
-10 -16 [-6,3,-5,-7,-6,13,4] 43
-10 -7 [-6,3,-7,-3,2,3,13] 41
-10 6 [-6,3,0,12,9,0,3] 50
-9 -22 [5,-4,-6,-8,-2,-20,-10] 167
-9 -18 [-6,-6,0,-1,-1,0,-6] 38
-9 -15 [5,5,-3,-5,-4,15,6] 178
-9 -6 [4,1,13,-1,-5,-6,7] 139
-9 -6 [5,5,-5,-1,4,5,15] 176
-9 7 [5,5,2,14,11,2,5] 185
-8 -24 [-5,-7,-9,-3,-21,-11] 6
-8 -17 [-6,-6,-8,-15,-7,-5,1] 31
-8 -17 [-5,-7,-14,-6,-30,-4,2] 76
-8 -17 [5,-4,2,1,1,2,-4] 173
-8 -10 [4,-4,-6,14,-12,-25,3] 121
-8 -8 [4,-6,-2,3,4,14] 15
-8 -6 [4,1,-1,-10,-12,-7,-4] 135
-8 -1 [4,-4,-6,-5,14,5] 17
-8 -1 [4,-6,-2,3,-3,-16,12] 115
-8 4 [-5,3,5,4,-5,9,17] 101
-8 4 [4,9,8,17,7,13,-3] 148
-8 5 [4,1,13,10,1,4] 24
-8 6 [-5,-12,1,-11,-17,3,-18] 72
-8 9 [4,-7,18,16,23,35,30] 111
-8 9 [4,-7,27,24,31,43,38] 114
-8 12 [4,9,8,9,20,1,12] 147
-7 -19 [-5,1,0,0,1,-5] 12
-7 -19 [-5,1,0,-14,0,1,-5] 92
-7 -16 [-5,-7,-14,-6,-19,-4,2] 77
-7 -16 [5,-4,-6,-13,-5,-3,3] 166
-7 -10 [-5,-12,-12,-2,-12,-9,-15] 67
-7 -9 [-5,-7,-15,5,11,19,5] 74
-7 -8 [4,14,2,0,7,19,14] 159
-7 -8 [4,14,11,8,15,27,22] 160
-7 2 [-5,3,0,7,-18,-10,6] 98
-6 -19 [-6,3,0,-2,4,-14,-4] 45
-6 -18 [-5,-7,-14,-6,-4,2] 5
-6 -13 [-5,-7,5,-1,-6,2,-9] 89
-6 -5 [-5,-12,-15,-12,-13,6,10] 64
-5 -18 [5,5,2,0,6,-12,-2] 180
-5 -15 [-5,-7,-9,-8,-27,-23,1] 82
-5 -14 [-6,3,8,7,7,8,2] 51
-5 -6 [-5,-7,5,-6,12,8,14] 86
-5 -4 [-6,-6,-16,9,20,8,-6] 27
-5 -4 [-5,-15,10,21,-14,9,-5] 57
-5 0 [-6,-6,-8,-1,-7,8,16] 34
-5 11 [-5,3,-3,5,3,9,-5] 95
-4 -20 [4,1,-1,5,-13,-3] 19
-4 -13 [-6,3,0,-7,1,3,9] 44
-4 -13 [4,1,-6,2,-22,4,10] 131
-4 -13 [5,5,10,9,9,10,4] 186
-4 -4 [-5,3,0,-15,-7,-1,10] 96
-4 -4 [-5,3,0,7,-18,-6,6] 99
-4 -3 [5,-4,-14,11,22,10,-4] 162
-4 1 [5,-4,-6,1,-5,10,18] 169
-4 8 [4,11,13,12,3,17,25] 155
-4 10 [4,-4,9,-3,-9,11,-10] 127
-3 -15 [4,9,8,8,9,3] 25
-3 -15 [4,9,8,-6,8,9,3] 146
-3 -12 [4,1,-6,2,-11,4,10] 132
-3 -12 [5,5,2,-5,3,5,11] 179
-3 -6 [4,-4,-4,6,-4,-1,-7] 122
-3 -5 [-5,-15,10,21,9,-5] 1
-3 -5 [-5,-15,10,21,9,0,-5] 58
-3 -5 [-5,3,6,0,11,-5,2] 103
-3 -5 [4,1,-7,13,19,27,13] 129
-3 -4 [-5,1,-4,-10,-9,-8,-3] 90
-3 -1 [-5,-7,0,-6,9,17] 8
-3 6 [4,11,8,15,-10,-2,14] 152
-2 -14 [4,1,-6,2,4,10] 18
-2 -14 [-5,-14,-9,-20,-21,0,5] 61
-2 -9 [4,1,13,7,2,10,-1] 144
-2 -1 [4,-4,-7,-4,-5,14,18] 119
-2 13 [-5,3,6,-12,-11,4,-5] 102
-1 -11 [4,1,-1,0,-19,-15,9] 137
-1 -4 [-5,-12,-9,-16,-12,-7,9] 69
-1 -3 [-6,-6,-15,2,-8,-10,-5] 29
-1 -2 [4,1,13,2,20,16,22] 141
-1 0 [-6,3,-8,17,28,16,2] 40
-1 0 [4,-7,18,29,-6,17,3] 112
-1 1 [-5,-14,-5,6,1,-10,0] 62
-1 4 [-6,3,0,7,1,16,24] 47
-1 15 [4,11,5,13,11,17,3] 149
0 -9 [-5,-7,-9,-12,-26,-15,0] 81
0 -2 [5,-4,-13,4,-6,-8,-3] 164
0 0 [4,11,8,-7,1,7,18] 150
0 0 [4,11,8,15,-10,2,14] 153
0 1 [5,5,-6,19,30,18,4] 175
0 5 [5,5,2,9,3,18,26] 182
1 -12 [-6,-6,-8,-1,-7,11,10] 35
1 -4 [-5,-14,3,-7,-9,-4] 3
1 -1 [4,-7,18,29,17,3] 14
1 -1 [4,-7,18,29,17,8,3] 113
1 -1 [4,11,14,8,19,3,10] 157
1 0 [4,9,4,-2,-1,0,5] 145
1 3 [4,1,8,2,17,25] 21
2 -11 [5,-4,-6,1,-5,13,12] 170
2 -10 [4,-6,-1,-12,-13,8,13] 116
2 1 [-5,-7,-14,-3,-21,-28,-22] 78
2 1 [-5,-7,-14,-3,-8,-12,-6] 79
2 15 [-5,3,0,-7,-9,6,-13] 97
2 17 [4,11,14,-4,-3,12,3] 156
2 18 [-5,-7,-9,0,-1,14,-7] 83
3 -13 [-5,-7,0,-6,12,11] 9
3 0 [4,-4,-1,-8,-4,1,17] 124
3 1 [-6,3,-7,10,0,-2,3] 42
3 5 [4,-6,3,14,9,-2,8] 117
4 -5 [4,1,-1,-4,-18,-7,8] 136
4 2 [5,5,-5,12,2,0,5] 177
4 18 [-5,-15,9,9,16,0,6] 55
5 -8 [-6,3,0,7,1,19,18] 48
5 0 [4,-6,11,1,-1,4] 16
6 -7 [5,5,2,9,3,21,20] 183
6 5 [4,1,-6,5,-13,-20,-14] 133
6 5 [4,1,-6,5,0,-4,2] 134
6 19 [4,11,8,1,-1,14,-5] 151
6 22 [4,1,-1,8,7,22,1] 138
7 -9 [4,1,8,2,20,19] 22
7 20 [-6,-6,-16,-3,9,3,32] 26
7 20 [-5,-15,-2,10,4,22,33] 54
8 7 [-5,-15,-12,-14,-7,5,0] 52
8 7 [-5,-15,-3,-6,1,13,8] 53
8 21 [5,-4,-14,-1,11,5,34] 161
8 22 [4,-7,17,17,24,8,14] 110
9 19 [-5,-15,-2,10,4,33] 0
11 24 [-6,3,-8,5,17,11,40] 39
11 24 [4,-7,6,18,12,30,41] 109
12 3 [-6,-6,-8,4,-4,-17,-11] 36
12 3 [-5,-7,5,-3,-16,10,-10] 87
12 11 [4,-7,-4,-6,1,13,8] 107
12 11 [4,-7,5,2,9,21,16] 108
12 25 [5,5,-6,7,19,13,42] 174
13 4 [-5,-7,5,-3,-16,21,-10] 88
13 4 [5,-4,-6,6,-2,-15,-9] 171
13 23 [4,-7,6,18,12,41] 13
14 2 [-5,-7,5,-3,-16,-10] 10
16 7 [-6,3,0,12,4,-9,-3] 49
16 7 [4,1,13,5,-8,18,-2] 142
17 8 [4,1,13,5,-8,29,-2] 143
17 8 [5,5,2,14,6,-7,-1] 184
18 6 [4,1,13,5,-8,-2] 23
To find the right reaction, just count down vertically in the attached file. The last number, Reaction#, in the above list is the first number in the long label string in the pattern.
Here's my quick-and-dirty revised script, which numbers the reactions and includes lots of other information, more or less useful: