Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
where is output

Posted by ysrise (ysrise), 18 August 2004
I wrote a very simple tcl program.

set foo "john"
puts "Hi my name is $foo"

I run it under Windows 2000 using the command window. But there was no outputs showed on the window. It just poped out a tk window and finished.  

Does anyone know why?

Thanks a lot.

Posted by admin (Graham Ellis), 19 August 2004
Sounds like you're running under wish (i.e. tcl/tk) if a Tk window popped up.  The #! line isn't doing anything (and is misleading). Try running under Tcl rather that Tk ... if you have to run under Tk, try creating a label and packing it.  Even under Tk, something odd is going on as in wish it should stick within the main application loop.

Dunno where your output is going .... if you're running under wish and/or your program is termining early (which ity might be, but I can't tell from what information I have) there's a chance that your output is correctky routed but it's buffered by Tcl and the buffer didn't get flushed to the output before the program terminated.  

Next stage?   Have a look at the thoughts above, modify what you're doing, experiement to find which of the suggestions may or may not be correct.  

Posted by ysrise (ysrise), 19 August 2004
Thank you for replying.

I added a line code

flush stdout

after my program, still there is no output.

But I don't know how to make my program run under tcl instead of tk.
Can a tcl program run under tcl and tk at a same time?

Thank you.

Posted by admin (Graham Ellis), 19 August 2004
OK ... let's take a step back here. Do you need a GUI (Graphic User interface - buttons, text boxes, etc in their own window) or do you want to have something that's purely command line?

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2022: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho