title: Create a raw input with commands inside a Python script
body: <p>I'm trying to implement a small script to manage a localhost with an FTP connection in Python from the command line and using the appropriate "ftplib" module. I would like to create a sort of raw input for the user but with some commands already setup.</p>
  
  <p>I try to explain better:</p>
  
  <p>Once I have created the FTP connection and login connection been successfully completed through username and password, i would show a sort of "bash shell" with the possibility to use the most famous UNIX commands ( for example <code>cd</code> and <code>ls</code> respectively to move in a directory and show file/folders in the current path ).</p>
  
  <p>For example i could do this:</p>
  
  <pre><code>&gt; cd "path inside localhost"
  </code></pre>
  
  <p>thus showing directories or:</p>
  
  <pre><code>&gt; ls
  </code></pre>
  
  <p>to show all files and directories in that particular path. I've no idea how to implement this so i ask you some advices.</p>
  
  <p>I thank you so much in advance for the help.</p>