Posted to tcl by de at Tue Jun 06 23:33:41 GMT 2023view raw

  1.  
  2. set fd [open [file join [file dir [info script]] pkgIndex.tcl] w]
  3. puts $fd "error {from pkgIndex.tcl}"
  4. close $fd
  5. set auto_path [linsert $auto_path 0 [file dir [info script]]]
  6. catch {package require foo}
  7. puts bar
  8.