(pofile)
| 194 | # return them as a list. |
| 195 | |
| 196 | def chunk(pofile): |
| 197 | # Chunk a given file into chunks separated by an empty line |
| 198 | with open(pofile, 'r') as f: |
| 199 | chunk = [] |
| 200 | for line in f: |
| 201 | line = line.strip() |
| 202 | if line.strip() == "": |
| 203 | yield chunk |
| 204 | chunk = [] |
| 205 | else: |
| 206 | chunk.append(line.strip()) |
| 207 | if chunk != []: |
| 208 | yield chunk |
| 209 | |
| 210 | colhtables = {} |
| 211 | queries = [] |