When I run the following command from a terminal, I see the output.
I wanted to put it in a proc. But the script gets no data.
It may just be a Windows thing but if it is not, how do I make this work?
% set f [open "|C:/Windows/System32/cmd.exe /Q /C ipconfig" r]
% fconfigure $f -blocking 0 -buffering full
wiki: https://wiki.tcl-lang.org/page/How+to+run+external+script+from+Tk+and+make+it+throw+output+to+the+console%3F
When I run the following command from a terminal, I see the output.
I wanted to put it in a proc. But the script gets no data.
It may just be a Windows thing but if it is not, how do I make this work?
% set f [open "|C:/Windows/System32/cmd.exe /Q /C ipconfig" r]
% fconfigure $f -blocking 0 -buffering full
cmd.exe itself doesn't produce output, so that's why you don't get
to see any input from the pipe.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 489 |
Nodes: | 16 (2 / 14) |
Uptime: | 45:40:00 |
Calls: | 9,670 |
Calls today: | 1 |
Files: | 13,719 |
Messages: | 6,169,995 |