| 346 | return False |
| 347 | |
| 348 | def source_synopsis(file): |
| 349 | line = file.readline() |
| 350 | while line[:1] == '#' or not line.strip(): |
| 351 | line = file.readline() |
| 352 | if not line: break |
| 353 | line = line.strip() |
| 354 | if line[:4] == 'r"""': line = line[1:] |
| 355 | if line[:3] == '"""': |
| 356 | line = line[3:] |
| 357 | if line[-1:] == '\\': line = line[:-1] |
| 358 | while not line.strip(): |
| 359 | line = file.readline() |
| 360 | if not line: break |
| 361 | result = line.split('"""')[0].strip() |
| 362 | else: result = None |
| 363 | return result |
| 364 | |
| 365 | def synopsis(filename, cache={}): |
| 366 | """Get the one-line summary out of a module file.""" |