```py
import subprocess

p = subprocess.Popen(['sudo motion'],
        shell = True,
          stdout = subprocess.PIPE,
          stdin = subprocess.PIPE)
p.wait()

stdout, stderr = p.communicate()

out = stdout.decode('utf-8')

print('-----------', out)

```

and i use "python3 sh2.py" running the above script but get the following results

```
[22636168:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
[22636168:motion] [NTC] [ALL] motion_startup: Motion 4.1.1 Started
[22636168:motion] [NTC] [ALL] motion_startup: Logging to file (/var/log/motion/motion.log)
-----------

```

How can I get the results