| 428 | # characters. End lines on a comma and begin argument list indented with |
| 429 | # the rest of the arguments. |
| 430 | def _split_line(name, arguments, width): |
| 431 | firstwidth = len(name) |
| 432 | k = firstwidth |
| 433 | newstr = name |
| 434 | sepstr = ", " |
| 435 | arglist = arguments.split(sepstr) |
| 436 | for argument in arglist: |
| 437 | if k == firstwidth: |
| 438 | addstr = "" |
| 439 | else: |
| 440 | addstr = sepstr |
| 441 | k = k + len(argument) + len(addstr) |
| 442 | if k > width: |
| 443 | k = firstwidth + 1 + len(argument) |
| 444 | newstr = newstr + ",\n" + " "*(firstwidth+2) + argument |
| 445 | else: |
| 446 | newstr = newstr + addstr + argument |
| 447 | return newstr |
| 448 | |
| 449 | _namedict = None |
| 450 | _dictlist = None |