It would be much better if you could get the x() to work as expected instead of using subprocess.

It breaks the "coding-standard" of syco, and we not getting proper output.

Maybe 
x_communicate, shell_run or shell_exec works better for you... The later two functions are kind of depricated, but better than using subprocess.

The can be found in 
https://github.com/systemconsole/syco/blob/version-0.2.8/bin/common/general.py