I'd like to have a simple reliable way to push a perhaps largish amount of data to an external [filter] ([pipeline]) and read it back. The obvious code here doesn't work because [gets] doesn't re-enter the event loop to allow data to be pushed to the pipeline. set fp [open "| cat" RDWR] proc write {} { puts $::fp "Hi" } fileevent $fp writable { write } while { [gets $fp line] >= 0 } { puts $line } Is there a simple incantation to wrap the gets with, allow non-blocking IO and re-entering the event loop, reliably returning the filtered data? ----- Another idea that I've used from [python] is to create a [thread] and write the data from a dedicated "writer" thread, reading the result back into the mainline thread. This is harder in Tcl because the two threads will be in different interpreters and therefor won't share the data. Is there a simple (not copying) way for [interp]s to share data? ----- [AMG] points out on the [filter] page that this is a real shortcoming - can this be remedied with a simple scripted solution? ------ Thanks [jbr]. ----- <>Enter Category Here