I’m developing a plugin for Sublime text and due some limitations of python in that environment I’m trying to get an json answer with Popen, I receive the data correctly, but seems like Popen is adding some weird characters in the output.
This is the ouput
(b'{"trink": {"id": "12"}}\r\n')
but it should be
{"trink": {"id": "12"}}
This is how I make the call:
process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE,shell=True)
output = process.communicate()
print(output)
With
output = process.communicate()[0]
only disappears the () from the original output
How can I get an clean output?
I’m using Sublime text 3 Build 3083
Windows 10-64b