1
2
3
imprt sys
print >> sys.stderr, 'string...'
sys.stderr.write('string...') # 同上