Re: Tcl source command directory
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Fri, 31 Mar 2006 11:21:40 -0600
Ray wrote:
I tend to build up and use the absolute pathname instead of relative
ones.
In each called script, put:
set scriptName [file tail [set scriptPath [info script]]]
set basedir [file dirname $scriptPath]
source [file join $basedir <your-libname-here>]
The above code produces a relative path not an absolute one. You need to change your source to read:
source [file normalize [file join $basedir <your-libname-here>]]
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.
- Follow-Ups:
- Re: Tcl source command directory
- From: Ray
- Re: Tcl source command directory
- References:
- Tcl source command directory
- From: brianlum
- Re: Tcl source command directory
- From: Gerald W. Lester
- Re: Tcl source command directory
- From: Ray
- Tcl source command directory
- Prev by Date: Re: case conversion
- Next by Date: Re: case conversion
- Previous by thread: Re: Tcl source command directory
- Next by thread: Re: Tcl source command directory
- Index(es):
Relevant Pages
|