NameError: name 'exit' is not defined : <p>I used cxfreeze to create a Windows executable from planrequest.py. It seemed to work ok, but when I run the exe file I get <code>NameError: name 'exit' is not defined</code></p>

<p><a href="https://stackoverflow.com/questions/30144893/name-exit-is-not-defined-in-python">name exit is not defined in python</a> states that the fix is to use <code>import sys</code>. However, I use import sys. The code runs fine as a python script (as in, I extensively tested the command line arguments before compiling to an executable.)</p>

<pre><code>import socket
import sys

if len(sys.argv) == 1:
    print("Usage:")
    print("PlanRequest [Request String] [Server IP (optional: assumes 127.0.0.1 if omitted)]")
    exit()

#[do stuff with the request]
</code></pre>
