~alessandrofac93/bumblebee-config-gui/0.6

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
@author: Alessandro Facciorusso
"""

import subprocess


def restartBumblebeed():
    output = ""
    process = subprocess.Popen("service bumblebeed restart".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stderr = process.communicate()
    output += stdout

    return output


def checkBumblebeedStatus():
    output = ""
    process = subprocess.Popen("bumblebeed -v".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stderr = process.communicate()
    output += stderr

    return output