Print a string with no terminating newline.
Compatible with the python 2 print statement.
>>> import sys
>>> fprint (sys.stdout, 'a'); fprint (sys.stdout, 'b')
a b
>>> fwrite (sys.stdout, '\\n')
<BLANKLINE>
>>> fprint (sys.stdout, 'a'); fprint (sys.stdout, 2.0, '\\n'); fprint (sys.stdout, 'b')
a 2.0
b
Definition at line 76 of file fprint.py.
77 """Print a string with no terminating newline.
79 Compatible with the python 2 print statement.
82 >>> fprint (sys.stdout, 'a'); fprint (sys.stdout, 'b')
84 >>> fwrite (sys.stdout, '\\n')
86 >>> fprint (sys.stdout, 'a'); fprint (sys.stdout, 2.0, '\\n'); fprint (sys.stdout, 'b')
90 if getattr (f,
'softspace', 0):
92 print (*_formatFloats (args), file=f, end=
'')
93 if len(args) > 0
and isinstance (args[-1], str)
and args[-1].endswith(
'\n'):