TABLE OF CONTENTS


::pwtk::print

SYNOPSIS

proc ::pwtk::print {args} {

DESCRIPTION

Print a properly indented message to stdout.

USAGE

::pwtk::print message

::pwtk::print label message

SOURCE

    if { [llength $args] == 2} {
        set label "[lindex $args 0]>"
    } else {
        set label " "
    }
    set message [lindex $args end]
    foreach line [split $message \n] {
        if { [string trim $line] == "" } {
            puts ""
        } else {
            puts [format "%5s %s" $label $line]
        }           
    }
    flush stdout
}