python cmd 3rd sub level not exiting
<p>I am working on some code from this recipy <a href="http://code.activestate.com/recipes/280500/" rel="nofollow">http://code.activestate.com/recipes/280500/</a>
<br>The EPP code (only the import) I got from github user jochem code: Python-EPP (just to be clear, I did not create the EPP code my self)</p>

<p>I added </p>

<pre><code>def do_A_register(self, args):
    i = A_register()
    i.cmdloop()
</code></pre>

<p>which leads me to:
(edit: Formatting got screwed up)</p>

<pre><code>class A_register(cmd.Cmd):
   prompt = "(A register) "
   def do_handles(self, args):
       # Goto sub command
       i = A_registerHandles()
       i.prompt = self.prompt[:-1]+'-&gt; handles $ '
       i.cmdloop()

   def do_domain(self, args):
       # Goto sub command
       pass

   def do_exit(self, args):
       return True

   def do_EOF(self, args):
       return self.do_exit(args)
</code></pre>

<p>if I do quit or crtl-D in this sub menu I go back 1 level which is want I want but if I go 1 level up to handles (level 2) I cannot go back to level 1 (where level 0 is the shell)</p>

<p>The 3rd level code is this</p>

<pre><code>class A_registerHandles(cmd.Cmd):
config = {
    'host': 'epp.a_registar.com',
    'port': 700,
    'user': '&lt;username&gt;',
    'pass': '&lt;password&gt;',
    'handle': '&lt;defaultHandle&gt;',
}

def do_handleAvailable(self, args):
    print "Give handle:",
    handle = raw_input().strip()
    self.epp = EPP(**self.config)
    self.contact = Contact(self.epp, handle)
    canCreate = self.contact.available()
    if bool(canCreate):
        print "Handle %s is free to use." % handle
    else:
        print "Handle %s is in use!" % handle

def do_handleInfo(self, args):
    print "Give handle: ",
    handle = raw_input().strip()
    self.epp = EPP(**self.config)
    self.contact = Contact(self.epp, handle)
    handleInfo = self.contact.info()

def do_exit(self, args):
    return True

def do_EOF(self, args):
    return self.do_exit(args)
</code></pre>

<p>So I would like to know how to return from level 2 to level 1 (or level 3 to 2 or 4 to 3, you catch my drift)</p>

<p>I created a working example that is returning from level 2 to level 1 but not from 3 to 2.
Due to the length I added the code to pastebin <a href="http://pastebin.com/qjF4LPXZ" rel="nofollow">http://pastebin.com/qjF4LPXZ</a> </p>

<p>The python version I am running:</p>

<blockquote>
  <p>Python 2.7.3 (default, Sep 26 2012, 21:51:14) 
  [GCC 4.7.2] on linux2</p>
</blockquote>

<p>Thnx for any response.
Paul.</p>
