From: Robert Klemme Date: 2009-12-17T15:45:33+09:00 Subject: Re: working with a slow pipe (IO.popen) On 17.12.2009 06:40, bwv549 wrote: > @Robert: I've looked through a lot of pymol docs and haven't found > anything on it yet, will post if I do. > > The solution you post looks very intriguing. It runs fine, but closes > before I get back the output I need. Frankly, I don't see how this can be: the reader thread should read *everthing* that comes out of the pipe and only stops if there is EOF. The only explanation I have so far is that maybe some CTRL-D or other EOF character is sent through the pipe making the reader think it has reached EOF. > It seems like there must be some > kind of a pause to let pymol start spitting out output. I may play > around with it some to see if I can get it working. Even if there is a pause the reader must wait. There must be something else happening. Maybe try to do it on the shell and use 'od' to see what is sent across the pipe. > @Eric: this solution works nicely and returns all the expected > output. I will be using it unless something better comes along. Good that you have a working solution. However, what you state worries me a bit. I believe we might not have identified the root cause of the issue. > Thanks to both of you for your excellent input on this. --John You're welcome! Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/