tcl::chan::std(n)
π tcl::chan::std β the standard-io glow-up π
okay bestie so this is a page from the Reflected/virtual channel support manual (that's the manual name, love that for it), and it's all about tcl::chan::std β Standard I/O, unification of stdin and stdout. yes. exactly what it sounds like. stdin and stdout, holding hands, one channel. iconic. π«Ά
β¨ SYNOPSIS β¨
package require Tcl 8.5 9
package require TclOO
package require tcl::chan::core ?1.1?
package require tcl::chan::std ?1.1?
::tcl::chan::std
like, that's the whole vibe. no cap. πΈ
π DESCRIPTION π
so the tcl::chan::std package gives you a command that creates a standard channel which unifies stdin and stdout into a single read- and writable channel. one channel. both jobs. she's doing it all, main character energy fr fr π
and the result is not seek-able β same as the original standard channels. so don't come for her about seeking, she simply does not do that. π
also, the internal TclOO class that implements the channel handler? it's a sub-class of the tcl::chan::core framework. cute family tree, honestly. π§
π API π
::tcl::chan::stdβ this command creates thestdchannel and hands you back its handle. and here's the tea: the channel is created only once, on the first call. every call after that? just returns that same handle. she's loyal. no duplicates, no drama. π
π BUGS, IDEAS, FEEDBACK π
okay so real talk β this document, and the package it describes, will undoubtedly contain bugs and other problems. yes, the manpage itself is admitting it. we love honesty. π
please report those in the category virtchannel of the Tcllib Trackers at http://core.tcl.tk/tcllib/reportlist.
and please also report any ideas for enhancements you may have for either the package and/or the documentation. we want them. bring them. β¨
when you're proposing code changes, please provide unified diffs, i.e the output of diff -u. that's the requirement, bestie, no shortcuts.
also note, further: attachments are strongly preferred over inlined patches. to make an attachment, go to the Edit form of the ticket immediately after its creation, and then use the left-most button in the secondary navigation bar. that's the whole process, you got this. π¦
π KEYWORDS π
- reflected channel
- standard io
- stdin
- stdout
- tip 219
- virtual channel
π CATEGORY π
Channels
π COPYRIGHT π
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole page, bestie β tcllib, version 1.1, from the tcl::chan::std(n) page itself. go unify some standard io, you absolute legend βπ
π₯
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms