Introducing stdout and stderr : stdout stderr « Development « Python






Introducing stdout and stderr

Introducing stdout and stderr

for i in range(3):                                
     print 'Dive in' 

import sys 
for i in range(3): 
     sys.stdout.write('Dive in')                 

for i in range(3): 
     sys.stderr.write('Dive in')                  
           
       








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.Redirecting stdout and stderr OutputRedirecting stdout and stderr Output
4.Redirecting Error Information
5.Printing to stderrPrinting to stderr