title: Creating a CLI (Shell?) in Python
body: <p>I am very newbie in Python but I have to implement for school a command line interpreter in Python language, but I am kinda lost in how to do that.</p>
  
  <p>I have already read some tutorials and created a simple file called functions.py where i include some simple functions like this:</p>
  
  <pre><code>def delete(loc):
      if os.path.exists(loc) == True:
          os.remove(loc)
          print "Removed"
      else:
          print "File not exists"
  </code></pre>
  
  <p>Now.. here is the thing.. in order to use this I must import it inside the python command interpreter, like...</p>
  
  <pre><code>import functions
  functions.delete("file to delete")
  </code></pre>
  
  <p>How can I make a Shell/CLI so instead of have to write all of this I can just write like:</p>
  
  <pre><code>delete file_name
  </code></pre>
  
  <p>Thanks!</p>