(cls, packageName)
| 31 | |
| 32 | @classmethod |
| 33 | def __InstallPackage(cls, packageName): |
| 34 | permissionGranted = False |
| 35 | while not permissionGranted: |
| 36 | reply = str(input("Would you like to install Python package '{0:s}'? [Y/N]: ".format(packageName))).lower().strip()[:1] |
| 37 | if reply == 'n': |
| 38 | return False |
| 39 | permissionGranted = (reply == 'y') |
| 40 | |
| 41 | print(f"Installing {packageName} module...") |
| 42 | subprocess.check_call(['python', '-m', 'pip', 'install', packageName]) |
| 43 | |
| 44 | return cls.__ValidatePackage(packageName) |
| 45 | |
| 46 | if __name__ == "__main__": |
| 47 | PythonConfiguration.Validate() |
no test coverage detected