Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

communication between to interpreters

44 views
Skip to first unread message

core powe

unread,
Feb 9, 2012, 4:14:14 AM2/9/12
to
I have an tcl project running with tclsh.exe.... In this project I
would like to create an other Interpreter in a separate application as
an small debugger for global variables.

One possibility is to use DDE Server/Client. I'm wondering if it's
possible to use TCOM or COM/DCOM zu communicate between the two tcl
interpreters?

Thankful for every help :)

core

Harald Oehlmann

unread,
Feb 9, 2012, 5:03:42 AM2/9/12
to
You may use the tcllib comm package:
package require comm
comm::comm config -local 0 -port 1991

For debugging, there are also tkconsole, TclInspector and TclDebugger

(from the book "Tcl8.5 Network Programming)

-Harald

M. Strobel

unread,
Feb 9, 2012, 6:42:29 AM2/9/12
to
Check if you just can run the application for debugging purpose in a shell like
tclsh, wish, tkcon.

/Str.

Ocsimize

unread,
Feb 9, 2012, 8:24:47 AM2/9/12
to
Hi !

Maybe the package "comm" in Tcllib ? From the descrption : "The comm command provides an inter-interpreter remote execution facility much like Tk's send(n), except that it uses sockets rather than the X server for the communication path. As a result, comm works with multiple interpreters, works on Windows and Macintosh systems, and provides control over the remote execution path."

O.

core powe

unread,
Feb 9, 2012, 10:09:40 AM2/9/12
to
Hello to all.

@Harald Oehlmann
> For debugging, there are also tkconsole, TclInspector and TclDebugger
> (from the book "Tcl8.5 Network Programming)
Where can I find this book or this TclInspector/ TclDebugger? ^^



I think I have to describe my problem properly :)
The first application (tclsh.exe= main project) runs continuously
executing a long commando list and prints at times reports to the
screen.
Actually there is no time to stop and wait for requests from the
second Application (tclsh.exe= debugger).
The project shoud work in this way that the main project is doing his
work until a request from the debugger (reading a global variable for
example) arrives to be answerd.

It would be much better to have an interrupt handling, but I know tcl
does'n support this. So I thought to solve this problem with an event
handling by using DDE Server/Client configuration.... Or how do you
think? Are there other possibilities to solve the problem?
Maybe there are existing debuggers I can use...

Thank you for help :)



Harald Oehlmann

unread,
Feb 9, 2012, 10:48:20 AM2/9/12
to
On 9 Feb., 16:09, core powe <corep...@gmail.com> wrote:
> Hello to all.
>
> @Harald Oehlmann> For debugging, there are also tkconsole, TclInspector and TclDebugger
> > (from the book "Tcl8.5 Network Programming)
>
> Where can I find this book or this TclInspector/ TclDebugger? ^^
http://wiki.tcl.tk/26647
IMHO very good book about the TCL universe.
Even good if you don't do any network programming.

> It would be much better to have an interrupt handling, but I know tcl
> does'n support this. So I thought to solve this problem with an event
> handling by using DDE Server/Client configuration.... Or how do you
> think? Are there other possibilities to solve the problem?
> Maybe there are existing debuggers I can use...

I think the comm package will give you what you need.
you initialise it and start the event queue (vwait).

On the other hand there are the following applications which might
help you (beside the ones I already mentioned):
tkcon
tkinspect
ram debugger

Unfortunately, I am the wrong person to ask. I don't do it this way
personally (expect using tkcon).
-Harald

Gerald W. Lester

unread,
Feb 9, 2012, 11:37:52 AM2/9/12
to
DDE, COM, comm package it does not matter -- events are only processed when
you "tell" tcl to go into the event loop (i.e. Tcl does not do interrupt
processing).

ActiveState offers a debugger as part of its TDK.

You need to modify your program to add: update idletask

This should be done at least at the beginning or end of the main loop (or
where ever you loop doing your processing).


--
+------------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email: Gerald...@kng-consulting.net |
+------------------------------------------------------------------------+

core powe

unread,
Feb 10, 2012, 3:39:19 AM2/10/12
to
Hello Gerald.

I use this activeState debugger already with eclipse IDE, but how can
I remotely debug my running tclsh project with it without influencing
my main application? I just want to have an small debugger for
checking the values of global variables.

What exactly is the tcl event loop? I think you mean this part of
code:

proc loop {} {....}

after idle loop
...

black

Gerald W. Lester

unread,
Feb 10, 2012, 9:24:55 AM2/10/12
to
On 2/10/12 2:39 AM, core powe wrote:
> Hello Gerald.
>
> I use this activeState debugger already with eclipse IDE, but how can
> I remotely debug my running tclsh project with it without influencing
> my main application?

Any and every debugger influences the application being debugged.


> I just want to have an small debugger for
> checking the values of global variables.
>
> What exactly is the tcl event loop?

Please search on http://wiki.tcl.tk

Harald Oehlmann

unread,
Feb 13, 2012, 5:02:12 AM2/13/12
to
On 10 Feb., 15:24, "Gerald W. Lester" <Gerald.Les...@KnG-
Consulting.net> wrote:
> On 2/10/12 2:39 AM, core powe wrote:
> > What exactly is the tcl event loop?
> Please search onhttp://wiki.tcl.tk

We are sorry, it is not waht you wrote.
As it is a basic language element of TCL, I would recomment to use a
TCL book or read the wiki.
Please come back if questions get more precise,
Harald

core powe

unread,
Feb 13, 2012, 8:56:01 AM2/13/12
to
Hello :)

Sorry for asking TCL basics ;)

I checked out the ramdebugger. But with this tool a can't Read global
variables from the main project....

Is there a better debugger awailable?

black

tombert

unread,
Feb 14, 2012, 2:53:39 AM2/14/12
to
You could try "Komodo IDE"
0 new messages