30 min lunchbreak, have to write fast...

I'm experimenting with sys.settrace() in a pyS60 application. Start ok, run ok, but after exit python shell does not appear. Title is changed from "My App" to "Python", but otherwise it still looks like my app... Second press on RSK exits python to AppShell. LSK seems to be partly connected to my app.

Is this a defect or is there something I need to do to cleanly close tracing? Now it looks like I almost exist but quite fully.

Exit is done this way:

Code:
class Main(object):
  def cb_quit(self):
    global gRunning
    gRunning = RUN_NOT
    app_lock.signal()

m = Main()
app_lock = e32.Ao_lock()
app_lock.wait()
--jouni