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 77 of file fprint.py.
78 """Print a string with no terminating newline.
80 Compatible with the python 2 print statement.
83 >>> fprint (sys.stdout, 'a'); fprint (sys.stdout, 'b')
85 >>> fwrite (sys.stdout, '\\n')
87 >>> fprint (sys.stdout, 'a'); fprint (sys.stdout, 2.0, '\\n'); fprint (sys.stdout, 'b')
91 if getattr (f,
'softspace', 0):
93 print (*_formatFloats (args), file=f, end=
'')
94 if len(args) > 0
and isinstance (args[-1], str)
and args[-1].endswith(
'\n'):