I can't interact with lv_micropython by Popen

Hi,

I tried to use Popen of python2/3 to interact with lv_micropyton unix port, but will be blocked by proc.stdout.readline() function:

proc = subprocess.Popen(['./micropython', '-i'],
                        stdin=subprocess.PIPE,
                        stdout=subprocess.PIPE,
                        stderr=subprocess.PIPE)
proc.stdin.write(b'2+2\n')
proc.stdin.flush()
proc.stdout.readline()

Dose anyone has any idea?
Thanks.

Hi @rockindy!
Could you check if the same thing happens with upstream Micropython stable version 1.12 ?
I recommend sending general Micropython questions (unrelated to LittlevGL) to Micropython Forum.
You’ll have a better chance to resolve the problem by sending such questions there.

Hi @amirgon,

Yes, the problem also exists in the upstream stable version.
Thanks for your suggestion.