Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass data between different tcl/tk applications?

Status
Not open for further replies.

charmdream

Programmer
Oct 26, 2001
25
0
0
US
As title!

How can different tcl/tk application exchange data?

Thanks
 
Wow, where to begin? There are many different options for interprocess communication (IPC) in Tcl. I'd recommend checking out the Tcl'ers Wiki, for more information about them all. You might want to start with the Wiki page "Inventory of IPC methods," to get a huge list of different IPC mechanisms supported in Tcl.

Personally, I most commonly use either interprocess pipes or sockets. You can get an overview of using pipes in Tcl from the links on the "pipeline" Wiki page, You can get pointers for using sockets in Tcl on the Wiki page "socket," - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Thanks for your reply.

But is there any simple way to pass (global) variables from one tcl application to another one?

thanks again.
 
I'm not trying to flame you here, but the question you're asking is quite ambiguous. Nobody here is going to be able to provide you with a quick, "cookbook" response without knowing a lot more. For example, here's the line of thought I had upon reading your request:[ul][li]Depends on what platform(s) you're running the applications on.[/li][li]Depends on whether the applications are running on the same system or on different systems.[/li][li]Depends on whether you need bi-directional communication or transfer in a single direction only.[/li][li]Depends on whether one application will be starting the other application, or the applications will be started and run independently.[/li][li]Depends on whether an application needs the values when it starts, or must be fed the values later on.[/li][li]Depends on whether we're talking about long-running applications exchanging data periodically, or applications we can fire off, get results back, and terminate on an as-needed basis.[/li][li]Depends on what you define as "simple."[/li][/ul]As you can see, there are a lot of issues to consider when implementing IPC. That's why with what little information I had, I couldn't give you a "cookbook" answer. That's also why there are probably 20+ different IPC solutions presented on that Wiki page I pointed you to. For a different set of circumstances, different people found different solutions to be "simpler."

Perhaps with more information about what you're doing, we can help to narrow down your options. But with what little I know so far, I couldn't begin to determine an appropriate tool for your situation. - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
The "send" command can help me to do it.
(This is what I was trying to find. But I forgot the command name at that time).

You really gave me more information on this topic. Maybe I can use them for other complicated cases later.

Thanks anyway.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top