1 |
+ |
from __future__ import division, print_function, unicode_literals |
2 |
|
|
3 |
|
import os |
4 |
|
import sys |
5 |
< |
import string |
5 |
> |
import builtins |
6 |
> |
if hasattr(builtins, 'raw_input'): # < Py3 |
7 |
> |
input = builtins.raw_input |
8 |
|
|
9 |
|
|
10 |
|
def _get_ltextl(): |
28 |
|
for i in range(0, llen, lines): |
29 |
|
sys.stderr.write('\n'.join(ltextl[i:i+lines])) |
30 |
|
if i+lines < llen: |
31 |
< |
raw_input('\n[press <return> to continue] ') |
31 |
> |
input('\n[press <return> to continue] ') |
32 |
|
|
33 |
|
def show_license(): |
34 |
|
try: |
40 |
|
s = 'Please enter "yes" or "no", or use ^C to exit: ' |
41 |
|
while answer not in ['y', 'ye', 'yes', 'n', 'no']: |
42 |
|
if answer: sys.stderr.write('invalid input "%s"\n' % answer) |
43 |
< |
answer = string.lower(raw_input(s)) |
43 |
> |
answer = input(s).lower() |
44 |
|
|
45 |
|
if answer[0] == 'y': |
46 |
|
return |
50 |
|
except KeyboardInterrupt: |
51 |
|
sys.stderr.write('\n*** Installation cancelled ***\n') |
52 |
|
sys.exit(1) |
53 |
+ |
|
54 |
+ |
# vi: set ts=4 sw=4 : |
55 |
|
|