ActiveTcl discussion

Tcl and ActiveTcl usage questions; Tcl practices and programming questions

Get The Command To Be Deleted

I am writing a C++ extension for ActiveTCL. As I understand it the Tcl_CmdDeleteProc that is supplied when a command is created will be called when the command is to be deleted.

When called, the Tcl_CmdDeleteProc is supplied with the Client data for the command. But I would also like to know the name of the command that is about to be deleted but that is not provided to the Tcl_CmdDeleteProc. Is it posssible to get the name of the command that is about to be deleted?


TCL Shell works but Komodo Shell does not

The following script called test1.tcl works well from a tclsh command line.

# test1.tcl
set matchResults [exec /usr/bin/neo4j-client --non-interactive --eval "match (n) return n;" localhost]
puts "Success! \n\n $matchResults \n"

% source test1.tcl


tcllib missing from Tcl 8.6 Community Edition

Tried to import the crc32 package and the response is "can't find package crc32".

Is tcllib not included in the Community Edition? If not, why document it in the Help file?

What else is not included in the Community Edition?

Error in choosing directory for installing ActiveTcl 8.5 for OpenSees


I'm trying to install ActiveTcl for OpenSees software. The instructions are to save it in C:/Program Files/Tcl.

But I attempt to do this, it says, "Cannot Write to Directory "C:/Program Files/Tcl". Please choose another directory.

Any help would be greatly appreciated


Multi process handling in TCl script

Need solution for parallel processing in tcl (windows).

I tried with thread, still not able to achieve desired output.

To simplify My requirement I am giving a simple example as following. Requirement: I want to run notepad.exe without effecting my current execution of flow. From main thread control should go to called thread, start notepad.exe and come back to main thread with out closing the notepad .

Tried:(Tcl script)

package require Thread

set a 10

proc test_thread {b} {

puts "in procedure $b"
set tid [thread::create] ;# Create a thread
return $tid

TCL code debugging from Visual Studio 2015

I would like to know if there are any tools which can help facilitate debugging of TCL source code from Visual Studio 2015.

snmptools issue

When executing:
> snmp session lo -v1 -t0.1 -c public
> set ret [lo get sysDescr.0]
> lo close
Get Output:
SNMPv2-MIB::sysDescr.0 = STRING: SG300-10PP 10-Port Gigabit PoE+ Managed Switch

I can repeat this as many I want it is always correct. Read next why i am stating this

When I source:
proc Go {} {
snmp session lo -v1 -t0.1 -c public
set ret [lo get sysDescr.0]
lo close
return $ret

and execute:
> Go
SNMPv2-MIB::sysDescr.0 = STRING: SG300-10PP 10-Port Gigabit PoE+ Managed Switch

So far all is fine (you think...)

Running tclsh86 under cygwin doesn't show prompt

I have ActiveTcl 8.6 installed on my Windows7 PC. I also have latest cygwin installed.

I open the cygwin terminal, and execute tclsh86 with:

$ /cygdrive/c/Tcl/bin/tclsh86

No prompt is shown, but it appears the tclsh86 is running as expected: I can execute tcl scripts, and the output from the scripts is displayed.

I need to get the prompt to display (my eventual aim is to run tclsh86 using pexpect from python under cygwin; for this to work the expect() function needs to be able to see the prompt...)

Readline support

Has anyone looked into getting readline support for the interactive shell on windows? I know activestate can't put it on teapot because its GNU software, but I'm curious if anyone has figured out how to do it on their own. The rkeane teapot repo doesn't have it for windows either, but does have readline for other platforms, which is a little ominous.

Help: How to check for unmount/bad disks before read file

I need help here.
I have list of directory/file path and my program will read through every one.
Somehow one of the directory is unmount and cause my program hang over there when I'm try to open the file using command below.

catch {set directory_fid [open $filePath r]}

So, how can I check the directory status before I'm reading/open the file? I want to skip that file if no response for certain time and continue to read next file.

*[file isdir $dir] is not working as well
*There is no response when i'm using "ls -dir" in Unix also.