"""The sys module also has attributes for stdin, stdout, and stderr
"""
"""
is useful for emitting warnings and error messages 
-to make them visible even when stdout has been redirected.
"""
import sys

print('sys.stderr:{}'.format(sys.stderr.write('Warning, log file not found starting a new one\n')))

# sys.exit()
"""The most direct way to terminate a script is to use sys.exit()."""
if __name__=='__main__':
    print('hello world.')
    sys.exit()
    print('hello')
1d0c8166d7021658817c3c169ccb0e07f676c318
<mask token>

<mask token>
print('sys.stderr:{}'.format(sys.stderr.write(
    'Warning, log file not found starting a new one\n')))
<mask token>
if __name__ == '__main__':
    print('hello world.')
    sys.exit()
    print('hello')

<mask token>
import sys
print('sys.stderr:{}'.format(sys.stderr.write(
    'Warning, log file not found starting a new one\n')))
<mask token>
if __name__ == '__main__':
    print('hello world.')
    sys.exit()
    print('hello')

"""The sys module also has attributes for stdin, stdout, and stderr
"""
"""
is useful for emitting warnings and error messages 
-to make them visible even when stdout has been redirected.
"""
import sys

print('sys.stderr:{}'.format(sys.stderr.write('Warning, log file not found starting a new one\n')))

# sys.exit()
"""The most direct way to terminate a script is to use sys.exit()."""
if __name__=='__main__':
    print('hello world.')
    sys.exit()
    print('hello')