I have a module that reads a queue and runs exec() with the value it read. As part of this I want to return the resulting output to another queue that the caller can read.
Since I can't override sys.stdout I am using uos.dupterm, however on the wipy. This fails (it works fine on the esp8266). Specifically it seems to hang as soon as it tries to write any data. Unfortunately since the board hangs I don't get any data on where/why it hangs.
The code is around line 35 here: https://github.com/dwighthubbard/microp ... oop.py#L35
What am I missing?
I'll probably next try this with an object that has read/write methods and nothing else.
uos.dupterm hangs the board
-
- Posts: 38
- Joined: Mon May 16, 2016 6:35 pm
Re: uos.dupterm hangs the board
Changing the class passed to uos.dupterm() to be a class with just read/write methods that do nothing, dupterm still hangs. Commenting out the dupterm() call prevents the device from hanging but the output doesn't get redirected.