Re: Redirect file output into variables

From: Markus Elfring (Markus.Elfring_at_web.de)
Date: 10/21/03


Date: 21 Oct 2003 08:55:04 -0700


> Can you explain more? Opening files and redirecting their
> contents to variables, lists, or arrays is done all the time
> by Tcl programmers. Same is true for writing vars, etc. to
> files. Or do you mean something else?

Did you read my first request for this topic?

I am thinking about the following application.
A limited execution environment will be created that forbids to
directly use standard file channels. For example, I must avoid that
output is written to STDOUT by calls to the TCL function "puts" before
the own data processing is finished. But these calls need a place to
store the output.
- How can the data be stored or redirected to a temporary file?
  or
- All file system calls will be intercepted to store the data into a
buffer that can be copied to a variable later.