For Python 2.7, raw_input is needed to request input; also ensure that sample
parameters are saved once requested.
This commit is contained in:
parent
983dfdab9f
commit
763cfeae21
@ -43,6 +43,12 @@ import getpass
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
# for Python 2.7 we need raw_input
|
||||||
|
try:
|
||||||
|
input = raw_input
|
||||||
|
except NameError:
|
||||||
|
pass
|
||||||
|
|
||||||
# default values
|
# default values
|
||||||
DEFAULT_MAIN_USER = "pythondemo"
|
DEFAULT_MAIN_USER = "pythondemo"
|
||||||
DEFAULT_EDITION_USER = "pythoneditions"
|
DEFAULT_EDITION_USER = "pythoneditions"
|
||||||
@ -70,6 +76,7 @@ def GetValue(name, label, defaultValue=""):
|
|||||||
value = getpass.getpass(label)
|
value = getpass.getpass(label)
|
||||||
if not value:
|
if not value:
|
||||||
value = defaultValue
|
value = defaultValue
|
||||||
|
PARAMETERS[name] = value
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def GetMainUser():
|
def GetMainUser():
|
||||||
|
|||||||
@ -49,6 +49,12 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
# for Python 2.7 we need raw_input
|
||||||
|
try:
|
||||||
|
input = raw_input
|
||||||
|
except NameError:
|
||||||
|
pass
|
||||||
|
|
||||||
# default values
|
# default values
|
||||||
DEFAULT_MAIN_USER = "pythontest"
|
DEFAULT_MAIN_USER = "pythontest"
|
||||||
DEFAULT_PROXY_USER = "pythontestproxy"
|
DEFAULT_PROXY_USER = "pythontestproxy"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user