'Creates instance of `Command` from a list of script parts.
:type raw_script: [basestring]
:rtype: Command
:raises: EmptyCommand'

@classmethod
def from_raw_script(cls, raw_script):

    script = cls._prepare_script(raw_script)
    if (not script):
        raise EmptyCommand
    env = dict(os.environ)
    env.update(settings.env)
    is_slow = (script.split('    ')[0] in settings.slow_commands)
    with logs.debug_time(u'Call:    {};    with    env:    {};    is    slow:    '.format(script, env, is_slow)):
        result = Popen(script, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env)
        if cls._wait_output(result, is_slow):
            stdout = result.stdout.read().decode('utf-8')
            stderr = result.stderr.read().decode('utf-8')
            logs.debug(u'Received    stdout:    {}'.format(stdout))
            logs.debug(u'Received    stderr:    {}'.format(stderr))
            return cls(script, stdout, stderr)
        else:
            logs.debug(u'Execution    timed    out!')
            return cls(script, None, None)
