Re: Passing arguments on Windows (XP)



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



Relevant Pages

  • Re: Socket recv() question?
    ... You might be doing something crazy, writing the data to the file one byte at ... socket function correctly? ... How come when I use the IE on the Pocket PC and started IIS on my PC. ... Configure tx timeout ...
    (microsoft.public.windowsce.app.development)
  • Re: New to C#
    ... However, I started messing with windows forms/.net and I really am liking it, for once managed code seems doable. ... I didn't like MFC very much, as it didn't seem to offer much to me that I couldn't do as easily using native Windows APIs. ... There are still too many situations where C++ is useful, and as long as anyone is writing non-managed applications I think C++ will be the language of choice. ... As far as sockets particularly go, based on the questions I've seen here, much of what trips people up writing for the .NET Socket class is the same stuff that trips people up writing for any other socket API. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Are write() calls guaranteed atomic?
    ... >> writing the data have no knowledge of the FIFO, ... > If you cannot modify the clients, try changing your server to create a ... > Unix domain socket instead of a named pipe (the clients shouldn't see ...
    (freebsd-hackers)
  • Re: C++ problem with a destructor
    ... > and write a data file to the file ... > descriptor (socket). ... > because, for kicks and grins, I tried writing a simple program to test ... add a private copy constructor and assignment operator and ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Tivo Program Data IP Address
    ... connecting to 204.176.49.3:80 ... writing 364 bytes to socket ... select-ing for header ...
    (uk.tech.tv.video.pvr)