Re: Name of file that contains proc
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Thu, 16 Aug 2007 15:28:47 -0500
Andrew wrote:
Hello all,
I'm wondering how to get the filename of the file that contains the
procedure, when I run the procedure. For example, if I have file
functions.tcl that contains this proc my_name, like so:
===functions.tcl===
proc my_name { } {
puts ?????;
}
===============
Then if I go run tclsh, source functions.tcl, and run my_name, it
should displays "functions.tcl". I tried global argv0, that gives me
the name of the executable, [info script] gives me nothing (it works
if I don't put it in the proc), and of course [info nameofexecutable]
gives me /usr/bin/tclsh. Any help would be appreciated!
This same question was posted in the last two weeks. You may want to google for that thread and read it.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.
- Follow-Ups:
- Re: Name of file that contains proc
- From: Andrew
- Re: Name of file that contains proc
- References:
- Name of file that contains proc
- From: Andrew
- Name of file that contains proc
- Prev by Date: Name of file that contains proc
- Next by Date: Re: Question about loading a DLL
- Previous by thread: Name of file that contains proc
- Next by thread: Re: Name of file that contains proc
- Index(es):
Relevant Pages
|
Loading