You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
586 B
Python

import os
import subprocess
class Snap:
env = os.environ.copy()
@staticmethod
def install(packages: list):
subprocess.run(
['sudo', 'snap', 'install'] + packages,
env=Snap.env,
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
@staticmethod
def remove(packages: list):
subprocess.run(
['sudo', 'snap', 'remove'] + packages,
env=Snap.env,
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)