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
570 B
Python

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