Print¶
Print the given data.
If data is not provided, the (editable) string port is used. The data (or string) can be a format string with %s etc placeholders, in which case the arguments are taken from the arg0-arg9 ports. If a non-string object is provided as data, the object prints by default with indentation, and long arrays can optionally be abbreviated using the abbrev option (True by default). The node can write to a number of destinations that are selectable by the dest port: debug, info, warning, error, and fatal generate log messages like those emitted by any other node. The stdout and stderr options write to the command line output and error streams, respectively, which can be useful when running a pipeline from a command line script. You can additionally write the output to a file by wiring the output port to the ExportText node. Print will by default append a newline character at the end, unless the "end" port is overridden, in which case multiple successive print statements append to the same line (except for log destinations).
Version 1.4.2
Ports/Properties¶
data¶
Data to print.
output¶
Printed output.
arg1¶
Format argument 1.
arg2¶
Format argument 2.
arg3¶
Format argument 3.
arg4¶
Format argument 4.
arg5¶
Format argument 5.
arg6¶
Format argument 6.
arg7¶
Format argument 7.
arg8¶
Format argument 8.
arg9¶
Format argument 9.
string¶
String to print. This string is used when no data is given, or used to combine multiple incoming data (through the arg0 to arg9 ports) with a format string. You can do this either by using generic placeholders (%s for a string, %i for an integer, %f or %.2f for a float (with 2-digit precision), etc., in the string, which will be sequentially replaced by the data coming into the arg0 to arg9 ports (so the first % placeholder is replaced by the data coming into arg0, the second by the data coming into arg1, and so on). I.e., Num trials: %d, Num errors: %d.
limit¶
Limit prints of large collections to at most this many items. This will print only the leading and trailing limit items, with an ellipsis in the middle.
summarize¶
If True, print summaries of certain fields, such as arrays and chunk properties.
handle_none¶
How to handle an incoming value of None. If print, None is printed as the string '(none)'. If ignore, None is ignored (replaced by an empty string), if skip, the node prints no output. If error, an exception is raised and log message printed.
dest¶
Destination for the output. The debug/info/warn/error/critical options will go to NeuroPype's logging facility with the corresponding log level, which is also written to disk and is accessible to applications interacting with NeuroPype's API. The stdout/stderr options will go to command line/terminal output/error streams, which is more useful when a pipeline is run from a commandline script. The result-only option will only return the string result via the "output" port ONLY and not also print it (note the printed string is always available on this port regardless of the destination setting).
flush¶
When printing to a stream, flush any buffers after the print.
end¶
String to print after the data. Defaults to a newline. This can be set to an empty string to print without a newline (note through that this will not work with log destinations - in this case you may want to first concatenate any strings and then write the result to a log.
respect_escape_seqs¶
If True, escape sequences in the string are processed. This is useful when the string is a format string that contains escape sequences, such as \n for a newline. If False, the string is printed as is.
print_once¶
If True, the node will only print the first incoming value and ignore the rest. This is useful if you have a repeating value and only want to output its first occurence (less verbose).
arg0¶
Format argument 0.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.