Printing to stderr : stdout stderr « Development « Python






Printing to stderr

Printing to stderr
print 'entering function' 

import sys 
print >> sys.stderr, 'entering function'           
           
       








Related examples in the same category

1.Use system function to outputUse system function to output
2.Different way to output string: print and sys.stdout.writeDifferent way to output string: print and sys.stdout.write
3.Introducing stdout and stderrIntroducing stdout and stderr
4.Redirecting stdout and stderr OutputRedirecting stdout and stderr Output
5.Redirecting Error Information