Posted to tcl by aspect at Sun Jan 26 16:41:17 GMT 2014view raw

  1. # see http://wiki.tcl.tk/21282
  2. namespace eval totk {
  3. proc initialize args {info procs}
  4. proc finalize args {}
  5. proc clear args {}
  6. proc flush {handle} {
  7. flush $handle
  8. }
  9. proc write {handle data} {
  10. .t insert end $data
  11. }
  12. namespace export *
  13. namespace ensemble create
  14. }
  15. package require Tk
  16. pack [text .t]
  17.  
  18. chan push stdout totk
  19.