ActiveTcl discussion

Tcl and ActiveTcl usage questions; Tcl practices and programming questions

Formating long strings with new line

Hello Forum,
Newbie here with a request for help with formatting. I need to trim and add newline at each "\" in a file location string that lies beyond the 60 character max for each line. Sample in attached file will be best explanation. Please notice the final file name is on its own line, 60 characters is max length per line and the indent is 3 blank spaces after the '('

Thank you for any assistance

i have a isuue

hi everyone
The difference is in which math library they call.

Java, Google, and C# are using the MicroSoft C# floating point math library.

Tcl and Perl are using a C floating point math library.

Both libraries follow their respective standards, so both are correct. You may disagree with the way the standards have been defined, but that is one of the differences of C vs C#.

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...)