proc srcfile { filename args } {
global argv
set argv $args
source $filename
}This proc will, of course, mung your argument vector, so make sure you have parsed it before "srcfile" is used.NEM: Or you could save and restore it: proc srcfile-safe {filename args} {
global argv
set save $argv
set argv $args
set rc [catch {source $filename} ret]
set argv $save
return -code $rc $ret
}MGS [2010-05-14]: Note: the above code should really use uplevel to source the file into the calling namespace, and also set the argc variable for completeness.See also:

