Show More
@@ -54,14 +54,14 b' def get_default_editor():' | |||||
54 | return ed |
|
54 | return ed | |
55 |
|
55 | |||
56 |
|
56 | |||
57 |
def get_pasted_lines(sentinel, input |
|
57 | def get_pasted_lines(sentinel, l_input=py3compat.input): | |
58 | """ Yield pasted lines until the user enters the given sentinel value. |
|
58 | """ Yield pasted lines until the user enters the given sentinel value. | |
59 | """ |
|
59 | """ | |
60 | print "Pasting code; enter '%s' alone on the line to stop or use Ctrl-D." \ |
|
60 | print "Pasting code; enter '%s' alone on the line to stop or use Ctrl-D." \ | |
61 | % sentinel |
|
61 | % sentinel | |
62 | while True: |
|
62 | while True: | |
63 | try: |
|
63 | try: | |
64 | l = input(':') |
|
64 | l = l_input(':') | |
65 | if l == sentinel: |
|
65 | if l == sentinel: | |
66 | return |
|
66 | return | |
67 | else: |
|
67 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now