Stdin/out with cygwish80.
Heribert Dahms
heribert_dahms@icon-gmbh.de
Thu Aug 17 12:56:00 GMT 2000
Hi,
being lazy, I'd just: catch { console show }
Bye, Heribert (heribert_dahms@icon-gmbh.de)
> -----Original Message-----
> From: Stucky, Mark B. UTRC [SMTP:StuckyMB@utrc.utc.com]
> Sent: Thursday, August 17, 2000 17:10
> To: 'C. R. Oldham'; Cygwin Mailing List
> Subject: RE: Stdin/out with cygwish80.
>
>
> Your problem is not a tty problem.
>
> When you run a Tk script on a UNIX machine, stdout (and stdin,stderr)
> is associated with the window (probably an xterm) that launched the
> script. So if you do a "puts" the output goes to that window.
>
> However, on Windows versions of Tk, stdout (stdin,stderr) are
> associated with a separate console window. It is the "same" console
> window that you see if you type "cygwish80" by itself.
>
> One simple solution is add "console show" to your script.
> This will display the console window. For example, try the following:
>
> button .b -text "Press Me" -command {puts "Hello"}
> pack .b
>
> console show
>
> The only problem is that the "console" command is not defined for UNIX
> systems. So if you need your script to be portable, you need to
> determine
> whether or not the script is running on UNIX (check the value of
> $tcl_platform(platform) ).
>
> Another approach would be to use a text widget and to re-direct your
> "puts" output to that text widget. I have an example of doing this,
> but in order to keep this message shorter, I'm not including it. If
> you want it, send me a separate email since this is a little off topic
> for the mailing list.
>
> --Mark stuckymb@utrc.utc.com
>
>
> -----Original Message-----
> From: C. R. Oldham [ mailto:cro@nca.asu.edu ]
> Sent: Thursday, August 17, 2000 10:37 AM
> To: Larry Hall (RFK Partners, Inc); Cygwin Mailing List
> Subject: Re: Stdin/out with cygwish80.
>
>
>
>
> "Larry Hall (RFK Partners, Inc)" wrote:
>
> > At 06:20 PM 8/16/2000, you wrote:
> > >Greetings,
> > >
> > >I wrote a little tcl/tk script to grab a passphrase from the user
> and
> > >output it to stdout. Unfortunately, cygwish80 does not appear to
> open
> > >stdout or allow tcl to "puts" to it. Am I missing something here?
> >
> > Could this be a tty problem? What's your CYGWIN variable set to?
> Is
> "tty"
> > in it? You might want to unset it and try again. Output from
> cygcheck
> may
> > help diagnosing this problem as well...
>
> I've tried with both 'tty' set and unset.
>
> Attached is 'cygcheck -s -v' output.
>
> --
> / Charles (C. R.) Oldham | NCA Commission on Schools \
> / Director of Technology | Arizona State University \
> / "cro at nca dot asu dot edu" | V:480/965-8703 F:480/965-9423 \
> | http://www.nca.asu.edu/ |
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list