dump(3tk)

✨ dump(3tk) ✨

okay bestie, welcome to the dump manual page β€” it's the TkCon one, from section 3tk, and it's literally your little state-printer for a Tcl interpreter πŸ’–


🌸 NAME 🌸

dump β€” dump information about a Tcl interpreter, in TkCon 🫢


✨ SYNOPSIS ✨

dump method ?-nocomplain? ?-filter pattern? ?--? pattern ?pattern ...?

πŸ’… DESCRIPTION πŸ’…

so the dump command is your bestie's way of spitting out state information about the interpreter β€” in a Tcl-readable form, which is also, conveniently, human-readable πŸŽ€ It takes the general shape:

dump method ?-nocomplain? ?-filter pattern? ?--? pattern ?pattern ...?

The patterns are glob-style patterns, exactly like in string match pattern $str. no cap.

-nocomplain stops dump from throwing an error when nothing matched your pattern β€” it's giving "no drama, we move on" 🌈

-filter gets interpreted however makes sense for whichever method you picked. iykyk.

and the methods?? the methods are iconic, here they are:

  • dump command args β€” outputs one or more commands ✨
  • dump procedure args β€” outputs one or more procs, in sourceable form πŸ’… (yes, sourceable, you can just feed it back in, periodt)
  • dump variable args β€” outputs the values of variables in sourceable form πŸ“ It recognizes nested arrays, which is lowkey the best part. The -filter pattern is used to filter array element names and is interpreted as a glob pattern (it defaults to {*}). It gets passed down for nested arrays too, so the filtering follows you all the way in πŸ‘‘
  • dump widget args β€” outputs one or more widgets by giving their configuration options πŸ¦‹ Here the -filter pattern filters the config options, and it's interpreted as a case insensitive regexp pattern (defaults to {.*}).
heads up bestie: watch which filter style you're using β€” dump variable wants a glob, dump widget wants a case insensitive regexp, and they have different defaults ({*} vs {.*}). not me mixing those up πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ KEYWORDS πŸ‘‘

Tk, console, dump


Copyright (c) Jeffrey Hobbs <jeff at hobbs.org>


and that's the whole page, bestie 🌸 this was TkCon 2.5, dump(3tk), go forth and dump responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from