f



How Tcl source finds init.tcl???

Hi,
I have one question about how Tcl finds init.tcl.
What environment variable does Tcl source use to get the search path for
init.tcl?
Is there any way to specifically use init.tcl from a certain path?

Thanks a lot in advance!

Lihong

0
5/14/2004 6:42:07 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

3 Replies
1259 Views

Similar Articles

[PageSpeed] 31

lihong pei wrote:
> I have one question about how Tcl finds init.tcl.
> What environment variable does Tcl source use to get the search path for
> init.tcl?

If the environment variable TCL_LIBRARY exists, it's value is assumed
to be a single directory which is added to the search path for init.tcl.

Note that this is offered mostly as a way for the end-user to
work around broken installations.  In any sane installation, you 
should not need to use this environment variable, and its use should
be avoided.

> Is there any way to specifically use init.tcl from a certain path?

There are a few ways.  The most suitable to choose depends on how you
are using Tcl.

Are you writing a C program that links to the Tcl library?

-- 
| Don Porter          Mathematical and Computational Sciences Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|
0
dgp1 (946)
5/14/2004 7:01:07 PM
lihong pei <lihong.pei@xilinx.com> wrote:

>Hi,
>I have one question about how Tcl finds init.tcl.
>What environment variable does Tcl source use to get the search path for
>init.tcl?
>Is there any way to specifically use init.tcl from a certain path?
>
>Thanks a lot in advance!
>
>Lihong

TCL_LIBRARY in the environment, if set.  Or in the interp, set tcl_library
prior to sourcing init.tcl (or having it sourced by Tcl_Init).

Or if you really want to get "tweaky" and want to bypass all automatica so
there is no possibility of the automatica getting it wrong, do something
like this in your C source for the application using tcl.  Note that there
is strong interaction of the initialization of the encodings directory for
how Tcl initializes itself.

const char* tcl_library_dir = "tcl/lib/tcl8.4";

void
class_Tcl::InitApplication (const char *app)
{
    // This call MUST be done from the main application thread.
    TclInitSubsystems(NULL);

    Tcl_Interp *interp = Tcl_CreateInterp();

    // Must set the encoding directory (it's actually the lib dir) by hand
    // because tcl looks to directories above the executable for this, not
    // any subdirectories.  Setting this forces the directory we want to
    // be used. Must be a normalized path, not relative.

    Tcl_Obj *parts[2];
    Tcl_Obj *native = Tcl_NewStringObj(app, -1);
    Tcl_IncrRefCount(native);
    Tcl_Obj *fixed = Tcl_FSGetTranslatedPath(interp, native);
    parts[0] = TclFileDirname(interp, fixed);
    Tcl_DecrRefCount(native);
    parts[1] = Tcl_NewStringObj(tcl_library_dir, -1);
    Tcl_IncrRefCount(parts[1]);
    Tcl_Obj *pathStr = Tcl_FSJoinToPath(NULL, 2, parts);
    Tcl_Obj *list = Tcl_NewListObj(1, &pathStr);
    TclSetLibraryPath(list);
    Tcl_SetDefaultEncodingDir(Tcl_GetString(TclGetLibraryPath()));

    // By manually setting the above we now init the encodings.
    Tcl_FindExecutable(app);

    if (Tcl_Init(interp) != TCL_OK) {
	puts(Tcl_GetResultString(interp));
	abort();
    }

-- 
David Gravereaux <davygrvy@pobox.com>
[species: human; planet: earth,milkyway(western spiral arm),alpha sector]
0
davygrvy (1376)
5/14/2004 7:12:52 PM
Don and David,
Got it. Thank you so much for your help!

Lihong

David Gravereaux wrote:

> lihong pei <lihong.pei@xilinx.com> wrote:
>
> >Hi,
> >I have one question about how Tcl finds init.tcl.
> >What environment variable does Tcl source use to get the search path for
> >init.tcl?
> >Is there any way to specifically use init.tcl from a certain path?
> >
> >Thanks a lot in advance!
> >
> >Lihong
>
> TCL_LIBRARY in the environment, if set.  Or in the interp, set tcl_library
> prior to sourcing init.tcl (or having it sourced by Tcl_Init).
>
> Or if you really want to get "tweaky" and want to bypass all automatica so
> there is no possibility of the automatica getting it wrong, do something
> like this in your C source for the application using tcl.  Note that there
> is strong interaction of the initialization of the encodings directory for
> how Tcl initializes itself.
>
> const char* tcl_library_dir = "tcl/lib/tcl8.4";
>
> void
> class_Tcl::InitApplication (const char *app)
> {
>     // This call MUST be done from the main application thread.
>     TclInitSubsystems(NULL);
>
>     Tcl_Interp *interp = Tcl_CreateInterp();
>
>     // Must set the encoding directory (it's actually the lib dir) by hand
>     // because tcl looks to directories above the executable for this, not
>     // any subdirectories.  Setting this forces the directory we want to
>     // be used. Must be a normalized path, not relative.
>
>     Tcl_Obj *parts[2];
>     Tcl_Obj *native = Tcl_NewStringObj(app, -1);
>     Tcl_IncrRefCount(native);
>     Tcl_Obj *fixed = Tcl_FSGetTranslatedPath(interp, native);
>     parts[0] = TclFileDirname(interp, fixed);
>     Tcl_DecrRefCount(native);
>     parts[1] = Tcl_NewStringObj(tcl_library_dir, -1);
>     Tcl_IncrRefCount(parts[1]);
>     Tcl_Obj *pathStr = Tcl_FSJoinToPath(NULL, 2, parts);
>     Tcl_Obj *list = Tcl_NewListObj(1, &pathStr);
>     TclSetLibraryPath(list);
>     Tcl_SetDefaultEncodingDir(Tcl_GetString(TclGetLibraryPath()));
>
>     // By manually setting the above we now init the encodings.
>     Tcl_FindExecutable(app);
>
>     if (Tcl_Init(interp) != TCL_OK) {
>         puts(Tcl_GetResultString(interp));
>         abort();
>     }
>
> --
> David Gravereaux <davygrvy@pobox.com>
> [species: human; planet: earth,milkyway(western spiral arm),alpha sector]



Don Porter wrote:

> lihong pei wrote:
> > I have one question about how Tcl finds init.tcl.
> > What environment variable does Tcl source use to get the search path for
> > init.tcl?
>
> If the environment variable TCL_LIBRARY exists, it's value is assumed
> to be a single directory which is added to the search path for init.tcl.
>
> Note that this is offered mostly as a way for the end-user to
> work around broken installations.  In any sane installation, you
> should not need to use this environment variable, and its use should
> be avoided.
>
> > Is there any way to specifically use init.tcl from a certain path?
>
> There are a few ways.  The most suitable to choose depends on how you
> are using Tcl.
>
> Are you writing a C program that links to the Tcl library?
>
> --
> | Don Porter          Mathematical and Computational Sciences Division |
> | donald.porter@nist.gov             Information Technology Laboratory |
> | http://math.nist.gov/~DPorter/                                  NIST |
> |______________________________________________________________________|




0
5/15/2004 12:26:06 AM
Reply:

Similar Artilces:

tcl-gaul: Genetic Algorithms for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-gaul Tcl-gaul is a Tcl extension for genetic/evolutionary algorithm processing.It relies on the GAUL library: http://gaul.sourceforge.net/ * A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. They are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover. For an introduction to genetic algorithms visit: http://gaul.sourceforge.net/intro.html Platform: Linux (GAUL library dependency) Home page: http://sourceforge.net/projects/tcl-gaul/ Man page: http://tcl-gaul.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-pam: PAM authentication for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-pam Tcl-pam is a Tcl interface to the PAM* service of Linux. It provides a Tcl package that allows Tcl scripts to use PAM to authenticate users and programs. It relies on linux-pam library: http://www.kernel.org/pub/linux/libs/pam/ * PAM (Pluggable Authentication Modules): A mechanism to integrate multiple low−level authentication schemes into a high−level application programming interface (API). This enables programs that rely on authentication to be written independently of the underlying authentication scheme. Platform: Linux Home page: http://sourceforge.net/projects/tcl-pam/ Man page: http://tcl-pam.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Can't find a usable init.tcl ... Tcl wasn't installed correctly
I built a toy tcl/tk program with an embedded interpreter. It works as expected under Linux. When I run the program from the Windows XP command prompt, initialization of the embedded interpreter fails, returning a message like: ----------------------------------------------------------- Can't find a usable init.tcl in the following directories: This probably means that Tcl wasn't installed correctly. ----------------------------------------------------------- I tried again after executing SET TCL_LIBRARY=C:\Tcl\Lib\tcl8.4 from the command prompt, and the Tcl_Init call succeeded. Have I actually installed Tcl incorrectly? I just accepted all the default settings rather dumbly during installation. Will I have to set TCL_LIBRARY like this each time I want to run such a program? In article <0d_Of.1893$kg.1014@news02.roc.ny>, Patrick wrote: > I built a toy tcl/tk program with an embedded interpreter. It works as > expected under Linux. > > When I run the program from the Windows XP command prompt, > initialization of the embedded interpreter fails, returning a message like: > > ----------------------------------------------------------- > Can't find a usable init.tcl in the following directories: What was here? Was there a long list of directories that you trimmed away when posting? If not something is very very weird. If so, then you trimmed exactly the part that might allow me to help you. > This probably m...

Install tcl 8.4 error, Can't find a usable init.tcl in the following directories
I build tcl 8.4.10 on Solaris 8, compile ok, but get error when running "make test" I run: configure --prefix=/users/xucai --exec-prefix=/users/xucai --enable-shared --enable-gcc //ok make //ok make test // this step failed. and get following error: LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \ TCL_LIBRARY="/users/xucai/src/tcl8.4.10/library"; export TCL_LIBRARY; \ ../tcltest ./../tests/all.tcl application-specific initialization failed: Can't find a usable init.tcl in the following directories: /users/xucai/src/tcl8.4.10/library /users/xucai/lib/tcl8.4 /users/xucai/src/tcl8.4.10/library /users/xucai/src/tcl8.4.10/tcl8.4 /users/xucai/src/tcl8.4.10/lib/tcl8.4 /users/xucai/src/lib/tcl8.4 /users/xucai/src/tcl8.4.10/library /users/xucai/src/library /users/xucai/src/tcl8.4.10/library /users/xucai/tcl8.4.10/library /users/xucai/lib/tcl8.4 /users/xucai/src/tcl8.4.10/library/init.tcl: can't read "::auto_path": no such variable can't read "::auto_path": no such variable while executing "lsearch -exact $::auto_path $Dir" what does it mean ? who can help ? thx. Jeff.c wrote: > I build tcl 8.4.10 on Solaris 8, compile ok, but get error when running... Q) Why are you choosing to build from source, when ActiveState offers pre-built ActiveTcl binaries for Solaris as a free download? <URL: http://www.activestate.com/Products/ActiveTcl/ > Q) If you insist on...

tcl-mq: POSIX Message Queues for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mp Tcl-mp is a Tcl interface to POSIX Message Queues*. It provides a Tcl package that allows scripts to create/open/close/unlink multiple parallel message queues, and to send/receive messages synchronously and asynchronously to/from them. * A POSIX message queue is an Inter-Process Communication mechanism available on Linux and some other POSIX-compliant operating systems. It allows to or more processes (or threads) to communicate under the same OS. The messages are buffered by the kernel, which gives them kernel persistency. A message queue can be thought of as a linked list of messages. Threads with adequate permission can put messages onto the queue, and threads with adequuate permission can remove messages from the queue. Each message is assigned a priority by the sender, and the oldest message of highest priority is always retrieved first. Unlike PIPES and FIFOS, no requirement exists that someone be waiting for a message to arrive on a queue, before some process writes a message to that queue. It's not even a requirement for both processes to exist at the same time. Read mq_overview(7) for more details Platform: Linux Home page: http://sourceforge.net/projects/tcl-mp/ Man page: http://tcl-mp.sourceforge.net/ Author: Alexandros Stergiakis alsterg On Sep 3, 11:37=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl pro...

tcl-mmap: A POSIX mmap interface for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mmap Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides a Tcl package that allows Tcl scripts to: 1) Memory map files for improved access efficiency; 2) Share memory between related processes; 3) Easily implement cyclic persistent log files. * See the mmap(2) man page. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-mmap/ Man page: http://tcl-mmap.sourceforge.net/ Author: Alexandros Stergiakis On Sep 3, 11:48=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl project: tcl-mmap > > Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides > a Tcl package that allows Tcl scripts to: 1) Memory map files for > improved access efficiency; 2) Share memory between related processes; > 3) Easily implement cyclic persistent log files. > > * See the mmap(2) man page. > Great to see this and the other packages you made. Looking at the manpage it looks a bit misformatted before the usage example. Any specific reason to use GPL for this instead the usual Tcl/MIT/BSD style license used? Michael schlenk wrote: > On Sep 3, 11:48 am, Alexandros Stergiakis <alst...@gmail.com> wrote: >> This is an announcement for a relatively new Tcl project: tcl-mmap >> >> Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides >> a Tcl package that...

tcl-syslog: Unix system logging for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-syslog Tcl-syslog is a Tcl interface to the *nix syslog service. It provides a Tcl package that allows Tcl scripts to log messages to syslog. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-syslog/ Man page: http://tcl-syslog.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Sourcing a TCL file from within a tcl file
I am a newbie which I am sure I don't need to state :) I am trying to create a variable with a TCL file that will source another tcl file when I type the variable name something like this if I enter A through my keyboard then source a.tcl Can someone show me how to do this thanks guy On Dec 10, 1:15=A0pm, guy <gcoletta2...@gmail.com> wrote: > I am a newbie which I am sure I don't need to state :) > > I am trying to create a variable with a TCL file that will source > another tcl file when I type the variable name > > something like this > > if I enter A through my keyboard =A0then source a.tcl > > Can someone show me how to do this > > thanks > guy What you are asking is not hard. Will your program have a graphical user interface? Aric On Dec 10, 3:26=A0pm, Aric Bills <aric.bi...@gmail.com> wrote: > On Dec 10, 1:15=A0pm, guy <gcoletta2...@gmail.com> wrote: > > > I am a newbie which I am sure I don't need to state :) > > > I am trying to create a variable with a TCL file that will source > > another tcl file when I type the variable name > > > something like this > > > if I enter A through my keyboard =A0then source a.tcl > > > Can someone show me how to do this > > > thanks > > guy > > What you are asking is not hard. =A0Will your program have a graphical > user interface? > > Aric no I am just using this script...

tcl-snmptools: SNMP v1/v2/v3 operations for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-snmptools Tcl-snmptools is a Tcl interface to the Net-SNMP library which provides operations for the management of remote SNMP agents. It supports all the standard SNMP v1/v2/v3 operations: connect, close, get, set, getnext, walk, bulkget, bulkwalk, trap, translate and others. It is currently in a functional state, but more work and testing needs to be done. Home page: http://sourceforge.net/projects/tcl-snmptols/ Man page: http://tcl-snmptols.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Opening a TCL program from within another TCL program in ANSYS Tcl-Tk
Hi everyone, I have been pulling my hair with this one for a couple of days and still have not found a fix. I'm working within ANSYS Tcl-Tk implementation. I created a Tcl-Tk script that generates a simple window with three buttons. Each button opens another window which is created in a separate Tcl file. The second window have a lot of text entries, variables, procedures, etc. I can open the second Tcl file by itself and everything works as supposed, but when I open it using the button in the first window, it opens but any procedure called by the widgets on the second window are not found... Here's the deal... Since I'm working within the ANSYS implementation of Tcl-Tk, I'm actually using an ANSYS command to open the second window. The command I use is: ### ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' ### It actually sends a command back to ANSYS telling it to execute a Tcl command... I know this is not pretty but its the only way i was able to make it at least show the window. ############################## #Main Tcl (excerpt): ############################## namespace eval Tools { proc IBRCambpell {} { #source O:/mad_projects_2/ANSYS/Macros/IBR_CAS.tcl ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' } proc viewManager {} { ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ ViewManager.tcl' } proc powerAnnotation {} { ans_sendcommand ~eui,'source ...

tcl application with tcl application
Here is another question, I have one tcl-based application A, my co- worker has a tcl-based application B. Now I want to integrate my application A into the application B. After integration, I want to be able to run A's tcl command in B. Assume I can only change A's code, is there any way to do this? On 17 Dez., 07:03, teacupfull business <teacupfull.busin...@gmail.com> wrote: > Here is another question, I have one tcl-based application A, my co- > worker has a tcl-based application B. Now I want to integrate my > application A into the application B. >...

How to compile tcl or encrypt tcl
I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before. But I cannot use the same method in Linux. Why? Is there any utility for me to compile or encrypt the code by using tixwish? The following is the simple code if I use the tixwish: #!/home/albertl/local/bin/tixwish puts "haha" And after using procomp by the TclPro1.5 Error in startup script: The TclPro ByteCode Loader is not available or does not support the correct version while executing "error "The TclPro ByteCode Loader is not available or does not support the correct version"" invoked from within "if {[catch {package require tbcload 1.3} err] == 1} { error "The TclPro ByteCode Loader is not available or does not support the correct version" ...." (file "a.tbc" line 4) The problem seems that tbcload1.3 cannot be found? But tbcload is already there "/home/albertl/local/lib/tbcload1.3" Why? Can anyone tell me? stratus schrieb: > I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before. > But I cannot use the same method in Linux. Why? > > Is there any utility for me to compile or encrypt the code by using tixwish? > Tixwish is just a wish shell with the Tix package baked in. If TclPro does not have a specific bigwish with Tix included your out of luck on that road (but could build your own if you liked). You might have success with freewrap or TDK, don't know for su...

How Tcl speaks for itself and how Tcl is not spoken for...
Hello It's Friday and... well... Two things about Tcl going through my mind this week, a nice anecdote and a eyebrow-rising thing on Wikipedia: Anecdote: Until three months ago I worked in a scientific institue where I wrote much software in Tcl, especially a big Build and Report System, some tools for automatic checking of coding style and other things. Tcl had a bad reputation there (not because of me... they dropped Tcl before I started there in favour of Joy, then JavaScript and now Python) and besides me, there was only one co-worker who appearantly writes some small Tcl-Scripts to support other researchers in their work. To get completely rid of Tcl, they even started to reimplement all things, I wrote in Tcl in Python just to have it in a language, that most of them know (which is a good decision on the one hand, but on the other hand, I think, it would be better to simply learn Tcl ;-), which made me a little bit sad. Now there is a new collegue who has to maintain some of the things I wrote. Comming from Perl he wasn't exactly enthusiastic when he heard, that he must maintain my old code in such an obscure language.. Two weeks ago, I got mail from him. He's just studying a complex system of scripts that are used for a sandboxed build system for source code which comes from external untrusted source and must be compiled and tested. Of course it's written in Tcl (and some bash-Scripting). He told me, that although he has never looked at Tcl before,...

Extending TCL in C with tcl.h - Disabliing [<tcl-cmd>] feature
Hi, TCL has a command execution syntax like this: [<tcl cmd>] Anything inside the 3rd bracket will be executed as a Tcl command by the Tcl interprater. Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? In other words, my Tcl interprator should print "[32]" for tcl command puts "[32]" It should not try to treat [] as a special character. Is this any way possible while extending Tcl in C with tcl.h? Thank you, Arijit * arijit79@gmail.com | puts "[32]" | | It should not try to treat [] as a special character. Check out the TCL quoting rules. http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M10 http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M15 Any of puts {[32]} puts "\[32\]" will do the trick. R' On May 8, 3:14 am, ariji...@gmail.com wrote: > Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? By doing this, you would disable the primary functionality of Tcl. I'm certain you could go into the tcl source and stop it - but why not talk about what you are really trying to do. Perhaps someone can give you a better way of doing what you are wanting to do. ...

Sourcing init.tcl
We use Tcl as an embedded interpretor in our application and we are upgrading from Tcl 8.4 to Tcl 8.5. One of the issues that we have discovered is that the 'clock' command will only work is 'init.tcl' has been sourced. Some questions: 1) Does it make sense that 'clock' in Tcl 8.5 requires 'init.tcl'? 2) It seems that 'init.tcl' should be automatically sourced and should not have to be manually sourced by scripts that uses 'clock'. Am I correct in that assumption and is there any reason why that might not happen? 3) There appears to be a connection between the Interpretor being given the environment variable 'tcl_rcFileName' and whether 'init.tcl' is auto-sourced. Does that make sense? TIA! ....Jake -- Jake Colman Director of Software Development Principia Partners LLC 101 West Elm Street Suite 620 Conshohocken, PA 19428 +1 (610) 755-9786 www.principiapartners.com Jake Colman wrote: > We use Tcl as an embedded interpretor in our application and we are > upgrading from Tcl 8.4 to Tcl 8.5. One of the issues that we have > discovered is that the 'clock' command will only work is 'init.tcl' has > been sourced. > > Some questions: > > 1) Does it make sense that 'clock' in Tcl 8.5 requires 'init.tcl'? > > 2) It seems that 'init.tcl' should be automatically sourced and should > not have to be manually sourced...

Tcl
Hello all. I found on hobbes the afaik latest Tcl for Os/2 v8.35 Is there any newer port, cause i try to update the eggdrop and that says: Your Tcl version is much too old for Eggdrop to use. You should download and compile a more recent version. The most reliable current version is 8.5.X and can be downloaded from ftp://tcl.activestate.com/pub/tcl/tcl8_5/. -- With the best regards from the Netherlands, Tu, "Tellerbop" <Tellerbop@wint.nl>, hai scritto questo in data Wed, 14 Jan 2009 19:11:18 UTC: > Hello all. > > I found on hobbes the afaik latest Tcl for Os/2...

Tcl
Hello, where can I see for tcl syntacs and how-to run a tcl test? Thank You Vittore ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: ptolemy-hackers-request@ptolemy.eecs.berkeley.edu ...

TCL
Hello, i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me how this can be done with VC 6.0? Best regards, Reinhold "Reinhold.kwauka" <bernd-reinhold.kwauka@t-online.de> wrote: >Hello, > >i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me >how this can be done >with VC 6.0? > >Best regards, >Reinhold > 1) get the source from http://tcl.sourceforge.net/ 2) open a command prompt 3) cd to the win/ subdirectory 4) call vcvars32.bat located in ??\vc98\bin\ of vc6 for wherever you installed it. 5) type @ the prompt: nmake -f makefile.vc -- David Gravereaux <davygrvy@pobox.com> [species: human; planet: earth,milkyway(western spiral arm),alpha sector] Reinhold.kwauka wrote: > Hello, > > i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me > how this can be done > with VC 6.0? > > Best regards, > Reinhold > > Its already done. Just download a binary release for windows and check \Program Files\Tcl\lib for the DLLs and static libraries. ...

Tcl command to evaluate a tcl script?
Hi all, I need to evaluate a separate tcl file within a tcl file. Is there any tcl command to evaluate a tcl file ? Regards, Prabu.K prabu wrote: > Hi all, > > I need to evaluate a separate tcl file within a tcl file. Is there any > tcl command to evaluate a tcl file ? > > Regards, > Prabu.K > hi, try: source your_other_tcl_file.tcl cheers, Tobi ...

Tcl extension: check Tcl version?
Is there a recommended way to check if a (binary) Tcl extension is loaded to the same Tcl version that was used for linking the extension? Currently I'm encountering a problem with an extension that I have built (and linked) with libtk8.3.so and that can be loaded under wish8.5 as well (without re-bulding, using package require). A number of newly provided commands work well in spite of the version mixture, but others don't, and wish8.5 crashes when these commands are used. Is this behavior normal, i.e. should I check that compile-time version and run-time version are identical? Or does this indicate some subtle coding problem? Thanks for any suggestions Olaf Olaf Dietrich wrote: > Is there a recommended way to check if a (binary) Tcl extension > is loaded to the same Tcl version that was used for linking > the extension? > > Currently I'm encountering a problem with an extension that > I have built (and linked) with libtk8.3.so and that can be > loaded under wish8.5 as well (without re-bulding, using > package require). A number of newly provided commands work > well in spite of the version mixture, but others don't, and > wish8.5 crashes when these commands are used. > > Is this behavior normal, i.e. should I check that compile-time > version and run-time version are identical? Or does this > indicate some subtle coding problem? Not subtle. Major problem. DO NOT DO THAT. If you want to be loadable across mult...

[TCL] diff type operations in TCL
I didn't see anything in tcllib and thus far haven't turned up anything that looks like it will work. I would like to know if there is a TCL package, or already written procedure, that will do a simple diff of two files and tell me if they're the same or if they have differences. Is there anything like this? --------------------------------------------- Andrew R. Falanga (a non-HP employee) Hewlett-Packard Company 11311 Chinden Blvd. Boise, Idaho --------------------------------------------- Please note: The e-mail address is purposely mangled. I do not wish my account at HP to become a spam haven. Andrew Falanga wrote: > I didn't see anything in tcllib and thus far haven't turned up anything > that looks like it will work. I would like to know if there is a TCL > package, or already written procedure, that will do a simple diff of two > files and tell me if they're the same or if they have differences. > > Is there anything like this? If all you want to know is if they are different, then: set fd [open $file1 r] set f1 [read $fd] close $fd set fd [open $file2 r] set f2 [read $fd] close $fd if {[string equal $f1 $f2]} then { puts "'$file1' and '$file2' are the same." } else { puts "'$file1' and '$file2' are different." } -- +--------------------------------+---------------------------------------+ | Gerald W. Lester ...

MS Dictation and TCL
I'm trying to use the MS dictation tool while in TCL 8.5 program. The text starts to appear, but then the program crashes. It would be great to find a way to make this work. Thanks! Barney Tcl 8.5 (wish 8.5) makeindex (12/14/2007) MSWinXP sp3 plenty of ram and storage ...

[TCL] multi-threaded tcl apps
Hi, Where can one find complete documentation on the ttrace package to the Thread package? I'd like to know what commands are available in ttrace and how to use them. --------------------------------------------- Andrew R. Falanga (a non-HP employee) Hewlett-Packard Company 11311 Chinden Blvd. Boise, Idaho --------------------------------------------- Please note: The e-mail address is purposely mangled. I do not wish my account at HP to become a spam haven. If you wish to e-mail me, the address consists of a dot between my first and last names (excluding my middle initial). The rest is accurate. Also, note, responses must be within the given context of messages I've posted to usenet. If it's not, I WILL NOT RESPOND! ...

Inline::Tcl vs. Inline::Tcl
The readme for CPAN's Inline::Tcl says this: > This module is not related to the Inline::Tcl module, but it might be > valuable to have some compatibility between the two. > This sentence seems to suggest that there is another module named Inline::Tcl somewhere. Is this true, and if so, where can I find it? Mumia W. wrote: > The readme for CPAN's Inline::Tcl says this: > > > This module is not related to the Inline::Tcl module, but it might be > > valuable to have some compatibility between the two. > > > > This sentence seems to suggest ...

Web resources about - How Tcl source finds init.tcl??? - comp.lang.tcl

Book sources - Wikipedia, the free encyclopedia
This page links to catalogs of libraries, booksellers, and other book sources where you will be able to search for the book with ISBN 9780226467313 ...

DOJ filing threatens to compel Apple to hand over iOS source code and signature if it fails to cooperate ...
... create the special version of iOS needed to break the passcode protection, the government could force the company to hand over both the source ...

TP-Link blocks open source router firmware to comply with new FCC rule
A TP-Link router. (credit: TP-Link. ) Networking hardware vendor TP-Link says it will prevent the loading of open source firmware on routers ...

DOJ warns that it could compel Apple to hand over iOS source code
... nuggets buried within the DOJ's 43-page brief raises the possibility that the government might seek to compel Apple to hand over the source ...

"The intelligence source said the FBI is 'extremely focused' on the 22 'top secret' emails deemed too ...
... of staff Cheryl Mills." "Mrs. Clinton sending them in this instance would show her intent much more than would receiving [them],” the source ...

Sources: Survivor of mass shooting may have been target
Victim was among 8 shot at late-night backyard barbeque in Pittsburgh suburb; five died

Government hints it may demand iOS source code, signing key
The government yesterday hinted that it may demand that Apple hand over the iOS source code and the encryption key the Cupertino, Calif. company ...

TP-Link Now Blocking Open Source Custom Router Firmware -
Hardware manufacturer TP-Link has announced the company will be blocking third-party open source custom firmware from being installed on the ...

Gwen Stefani Is Not Attending the Kids' Choice Awards With Blake Shelton, Source Says
Gwen Stefani Is Not Attending the Kids' Choice Awards With Blake Shelton, Source Says

Microsoft reaches out and embraces open-source Eclipse
Organizations using Microsoft's Azure or Visual Studio Team Services along with an open-source Eclipse IDE will be happy to hear that Microsoft ...

Resources last updated: 3/13/2016 7:34:51 PM