Externals   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 1
1
#!/usr/bin/python
2
# -*- coding: UTF-8 -*-
3
import subprocess
4
5
class Externals(object):
6
    """Utility that wraps the python subprocess module to start other applications
7
    """
8
9
    def run(self, command):
10
        """Start a subprocess with the command provided.
11
12
        Args:
13
            command (list): A list of command elements.
14
        """
15
        output = subprocess.check_output(command)
16
        return Result(True, output)
17
18
19
class Result(object):
20
21
    def __init__(self, succesful, output):
22
        self.succesful = succesful
23
        self.output = output
24