print “hello” _ prints on stdout
sys.stdout.write(“hello”) _ same
sys.stderr.write(“hello”) _ prints on stderr
print >>sys.stderr, “hello” _ same
outfile = open(“logfile.txt”, “w”)
print >>outfile, “hello” _ prints to “logfile.txt”
Previous slide | Next slide | Back to first slide | View graphic version |