1238 @type str |
1238 @type str |
1239 @return flag indicating a successful installation |
1239 @return flag indicating a successful installation |
1240 @rtype bool |
1240 @rtype bool |
1241 """ |
1241 """ |
1242 ok = False |
1242 ok = False |
1243 print(message, "\n") |
1243 print("{0}\n\nShall '{1}' be installed using pip? (Y/n)" |
1244 answer = input("Shall '{0}' be installed using pip? (Y/n) " |
1244 .format(message, packageName), end=" ") |
1245 .format(packageName)) |
1245 answer = input() |
1246 if answer in ("", "Y", "y"): |
1246 if answer in ("", "Y", "y"): |
1247 exitCode = subprocess.call( |
1247 exitCode = subprocess.call( |
1248 [sys.executable, "-m", "pip", "install", packageName]) |
1248 [sys.executable, "-m", "pip", "install", packageName]) |
1249 ok = (exitCode == 0) |
1249 ok = (exitCode == 0) |
1250 |
1250 |