do not understand this use of sys module
<p>Here is code from a tutorial in A Byte of Python:</p>

<pre><code>import sys

filename = 'poem.txt'

def readfile(filename):
    #Print a file to standard output
    f = file(filename)
    while True:
        line = f.readline()
        if len(line) == 0:
            break
        print line,
    f.close()

if len(sys.argv) &lt; 2:
    print 'No action specified'
    sys.exit() //&lt;--This is where the error is occurring

if sys.argv[1].startswith('--'):
    option = sys.argv[1][2:] #fetches sys.argv[1] without first 2 char
    if option == 'version':
        print 'Version 1.2'

    elif option == 'help':
        print '''\
This program prints files to the standard output.
Any number of files can be specified.
Options include:
    --version: Prints the version number
    --help: Displays this help'''

    else:
        print 'Unknown option'
    sys.exit()

else:
    for filename in sys.argv[1:]:
        readfile(filename)
</code></pre>

<p>When I run this code, this is the error that appears:</p>

<pre><code>Traceback (most recent call last):
  File "C:/Python/sysmodulepr.py", line 17, in &lt;module&gt;
    sys.exit()
SystemExit
</code></pre>

<p>I don't understand why. Please help.</p>
