summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-05-12 14:59:24 (GMT)
committerGuido van Rossum <guido@python.org>1998-05-12 14:59:24 (GMT)
commita890e688076d323baa8aef5b5da4bc6a60ad3adc (patch)
tree68357abeb1a43c8ea50bb6650a187ce13a4e1e7a /Modules/_tkinter.c
parentbf6a9b165a07f0ab4604458b3977bd9b05f3ad94 (diff)
downloadcpython-a890e688076d323baa8aef5b5da4bc6a60ad3adc.zip
cpython-a890e688076d323baa8aef5b5da4bc6a60ad3adc.tar.gz
cpython-a890e688076d323baa8aef5b5da4bc6a60ad3adc.tar.bz2
New APIs to write to sys.stdout or sys.stderr using a printf-like interface.
Adapted from code submitted by Just van Rossum. PySys_WriteStdout(format, ...) PySys_WriteStderr(format, ...) The first function writes to sys.stdout; the second to sys.stderr. When there is a problem, they write to the real (C level) stdout or stderr; no exceptions are raised (but a pending exception may be cleared when a new exception is caught). Both take a printf-style format string as their first argument followed by a variable length argument list determined by the format string. *** WARNING *** The format should limit the total size of the formatted output string to 1000 bytes. In particular, this means that no unrestricted "%s" formats should occur; these should be limited using "%.<N>s where <N> is a decimal number calculated so that <N> plus the maximum size of other formatted text does not exceed 1000 bytes. Also watch out for "%f", which can print hundreds of digits for very large numbers.
Diffstat (limited to 'Modules/_tkinter.c')
0 files changed, 0 insertions, 0 deletions