Re: Packages and Expect
- From: Uwe Klein <uwe_klein_habertwedt@xxxxxxxxxxx>
- Date: Mon, 30 Apr 2007 16:32:56 +0200
Donal K. Fellows wrote:
Uwe Klein wrote:YES, i missed out on that.
package require givdatnich
You're doing this to initialize the package loading database? Unless you
already have such a package, you'll have a problem with it if you don't
wrap it in a [catch].
proc loadwhatimean packname {
if {[catch {package require $packname } cerr ]} {
set whatwehave [ package names ]
set found [ lsearch -inline -regexp $whatwehave ***:(?i)$packname ]
puts stderr "required: $packname found : $found"
if {$found != {} } {
return [ package require $found ]
} else {
puts stderr bahh
# error or return -errorcode ..?
}
}
return $cerr
Donal.
uwe
.
- References:
- Packages and Expect
- From: Tom Conner
- Re: Packages and Expect
- From: Larry W. Virden
- Re: Packages and Expect
- From: Uwe Klein
- Re: Packages and Expect
- From: Donal K. Fellows
- Packages and Expect
- Prev by Date: Re: Snack, play sound: script behavior in C++ program diifers from the same running under Wish.
- Next by Date: Re: Please help me with some perl...
- Previous by thread: Re: Packages and Expect
- Next by thread: libraries and itclsh missing from Tcl8.4?
- Index(es):
Relevant Pages
|