Question

I am trying to use winpexpect to have an interactive subprocesses in Python. I am completely baffled. When I run a unit test, winspawn executes normally along with all the expects. When I run my program as a whole, winspawn inexplicably blocks forever. How can this be? As far as I know, winspawn is non-blocking.

Was it helpful?

Solution

So, I found out that the string I was passing to winpexpect was Unicode in one case and str in another case. It seems that winpexpect will block at winspawn if the string you pass in is unicode.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top