title: NameError: name '___' is not defined
body: <p>When running the following code in terminal:</p>
  
  <pre><code>import getpass
  import sys
  import telnetlib
  import time
  
  user = input("Please Enter Your Username: ")
  password = input("Please Enter Your Password: ")
  ip = input("Please Enter RPi IP Address: ")
  
  bot = telnetlib.Telnet(ip)
  bot.read_until("login: ")
  bot.write(user + "\n")
  bot.read_until("password: ")
  bot.write(password + "\n")
  </code></pre>
  
  <p>I get an error message saying:</p>
  
  <pre><code> Traceback (most recent call last):
     File "con.py", line 6, in &lt;module&gt;
       use = input("Please Enter Your Username: ")
     File "&lt;string&gt;", line 1, in &lt;module&gt;
   NameError: name 'pi' is not defined
  </code></pre>
  
  <p>P.S <code>pi</code> is what was fed to the variable <code>user</code>. It runs in python shell(until it gets to the telnet part but then it would obviously doesn't work in the shell). why wouldn't it run in the terminal?</p>
  
  <p>Thanks</p>