Overview
| Artifact ID: | 29f777aad34f025078cdf53022ae3531ee713d96 |
|---|---|
| Ticket: | 61f50377506aeb6ebb85a242b3e5ac592bf3aef5
wish doesn't print to stdout on windows |
| User & Date: | anonymous on 2015-10-08 04:59:03 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Hi, I tried to print to stdout using wish on windows. I tried this: puts hello But it doesn't print nothing to stdout. I developed a code to get the clipboard data from a Tcl program executed using tclsh. But this code doesn't work on windows and I think that the reason is that nothing is sent to stdout. This is the code: namespace eval clipboard { namespace export append clear get close namespace ensemble create variable mypipeline variable clipboard_data variable clipboard_length proc Initialization {path_to_wish} { variable mypipeline [open |$path_to_wish r+] fconfigure $mypipeline -buffering line puts $mypipeline {fconfigure stdout -buffering line} puts $mypipeline {wm withdraw .} } proc append {txt} { variable mypipeline puts $mypipeline "clipboard append [list $txt]" } proc clear {} { variable mypipeline puts $mypipeline {clipboard clear} } proc get {} { variable mypipeline variable clipboard_data variable clipboard_length puts $mypipeline { if {[catch {set clipboard_data [clipboard get]}]} { return 0 } else { puts [string length $clipboard_data] puts -nonewline $clipboard_data flush stdout } } fileevent $mypipeline readable ::clipboard::GetClipboardLength vwait getting_length if {$clipboard_length == 0} { set clipboard_data "" } else { fileevent $mypipeline readable ::clipboard::GetClipboardData vwait getting_data fileevent $mypipeline readable "" } return $clipboard_data } proc GetClipboardData {} { variable mypipeline variable clipboard_data variable clipboard_length upvar getting_data getting_data set clipboard_data [read $mypipeline $clipboard_length] set getting_data 1 } proc GetClipboardLength {} { variable mypipeline variable clipboard_length upvar getting_length getting_length set clipboard_length [gets $mypipeline] set getting_length 1 } proc close {} { variable mypipeline close $mypipeline } } ::clipboard::Initialization /usr/local/bin/wish8.6 ::clipboard append hola puts [clipboard get] - foundin changed to: "8.6"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "1c4b6cdb98c9dfc4d1e74018f3f4efa00ad217e2"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "25. Channel System"
- title changed to: "wish doesn't print to stdout on windows"
- type changed to: "Bug"