Sharedsupport / 2015-12-06-172014-stderr.sagewsOpen in CoCalc
Authors: Harald Schilly, ℏal Snyder, William A. Stein
License: GNU General Public License v3.0
Description: Examples for support purposes.
import sys print >> sys.stderr, "Hello"
Hello
sys.stderr.write('hi') sys.stderr.flush()
hi
print >> sys.stderr, "Hello"
Hello
from __future__ import print_function print("Hello", file=sys.stderr)
Error in lines 2-2 Traceback (most recent call last): File "/projects/sage/sage-6.9/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 905, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "<string>", line 1 print("Hello", file=sys.stderr) ^ SyntaxError: invalid syntax