title: Line completion with custom commands
body: <p>my Python program can be launched with a range of different options (or subcommands) like:</p>
  
  <pre><code>$ myProgram doSomething
  $ myProgram doSomethingElse
  $ myProgram nowDoSomethingDifferent
  </code></pre>
  
  <p>I want it to use auto-completion with  so that if i type "myProgram d" it returns "myProgram doSomething" and if i type "myProgram n" it renders "myProgram nowDoSomethingDifferent". This is similar to the average use of the module <em>rlcompleter</em>, but it does not pick possible completion options from the filesystem (or from history) but from a custom set of strings (that correspond to the available options for my program)</p>
  
  <p>Any idea on how to implement this?</p>
  
  <p>I'm aware of the variable PYTHONSTARTUP (that should point to a file I don't know how to write).</p>
  
  <p>As a working example, django-admin (from the django package) has the same exact feature i'm looking for</p>