I have a very strange problem with tcl slave interper
I use the following code to open file for writing in slave interper and it works well:
####
interp create foo
foo eval {set f [open w+]}
foo eval {puts $f "hello world"}
foo eval {close $f}
##
I can see "hello world" is written to file "But once I provide alias of "puts" in slave interper, I can't put any word to the file. The codes are following:
####
interp create foo
interp alias foo puts {} pp
proc pp {args} {}
foo eval {set f [open w+]}
foo eval {puts $f "hello world"}
foo eval {close $f}
Can anyone help me to solve this issue.
Thanks very much
I use the following code to open file for writing in slave interper and it works well:
####
interp create foo
foo eval {set f [open w+]}
foo eval {puts $f "hello world"}
foo eval {close $f}
##
I can see "hello world" is written to file "But once I provide alias of "puts" in slave interper, I can't put any word to the file. The codes are following:
####
interp create foo
interp alias foo puts {} pp
proc pp {args} {}
foo eval {set f [open w+]}
foo eval {puts $f "hello world"}
foo eval {close $f}
Can anyone help me to solve this issue.
Thanks very much