Posted to tcl by aspect at Sat May 10 19:08:31 GMT 2008view raw

  1. namespace eval putschan {
  2. proc initialize {fd mode} {
  3. return {}
  4. }
  5. proc finalize {fd} {
  6. return {}
  7. }
  8. proc watch {fd ev} {
  9. return {}
  10. }
  11. proc seek {fd ofs} { return {} }
  12. proc configure {fd opt val} { return {} }
  13. proc cget {fd} { return {} }
  14. proc cgetall {fd} { return {} }
  15. proc blocking {fd mode} { return {} }
  16. proc write {fd data} {
  17. puts $data
  18. }
  19. namespace export *
  20. namespace ensemble create
  21. }
  22.  
  23.  
  24. set fd [chan create write cbchan]
  25. puts $fd "Hello, World!"
  26. close $fd
  27.