delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/17/11:12:32

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <EC421C2230BBD211A11400805FA7784D25DBC1@express8.res.utc.com>
From: "Stucky, Mark B. UTRC" <StuckyMB AT utrc DOT utc DOT com>
To: "'C. R. Oldham'" <cro AT nca DOT asu DOT edu>,
Cygwin Mailing List
<cygwin AT sources DOT redhat DOT com>
Subject: RE: Stdin/out with cygwish80.
Date: Thu, 17 Aug 2000 11:10:21 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

------_=_NextPart_001_01C0085D.440DA6E0
Content-Type: text/plain;
	charset="iso-8859-1"


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 AT utrc DOT utc DOT com


-----Original Message-----
From: C. R. Oldham [mailto:cro AT nca DOT asu DOT 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/                     |


------_=_NextPart_001_01C0085D.440DA6E0--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019