A simple python script to install a rpm package in linux

Below is the simple program to install a package named “vsftpd” in linux OS. You need to import “os” module for that. #!/usr/bin/python3.6 import os try: os.system(‘dnf install vsftpd’) except: exit("Failed to install package")