Re: Passing arguments on Windows (XP)
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Thu, 30 Aug 2007 08:43:56 -0500
Arjen Markus wrote:
On 30 aug, 14:23, tclco...@xxxxxxxxxxxxxxxxxxxx wrote:Hi,
I'm trying to put a Tk front-end onto a program I've been given
which reads from stdin.
Looking at the manual, it seems that I could do this with exec,
getting the prgram to read from a socket and writing the arguments to
that socket. However, I'm on Windows, and the manual says that reading/
writing from/to a socket doesn't work on Windows.
Is there a mechanism that DOES work, other then writing a
temporary file, which I can see would work, but seems inelegant.
TIA
Alan
Yes, there is:
exec yourprogram << $value
where $value is the value of a variable filled with the
input for the program.
BTW sockets work just as they are supposed to.
You may find http://wiki.tcl.tk/3359 of some interest
as well (more general than just Fortran programs :))
You may also want to look at the open command with the pipe ("|") option.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.
- References:
- Passing arguments on Windows (XP)
- From: tclcoder
- Re: Passing arguments on Windows (XP)
- From: Arjen Markus
- Passing arguments on Windows (XP)
- Prev by Date: Re: WebServicesForTcl
- Next by Date: Tcl-URL! - weekly Tcl news and links (Aug 30)
- Previous by thread: Re: Passing arguments on Windows (XP)
- Next by thread: Debugging hang
- Index(es):
Relevant Pages
|