Funny you said that, because I didn't even bother trying it because I didn't think it would work either. I figured that python did something internally when it saw the -i switch. Looks like it just checks for it when it's done with your code.
One difference between the two methods that I see is that when you set PYTHONINSPECT you don't really have to do anything else and unless sys.exit() or raise SystemExit is used you will get the interactive prompt. Using code.interact you would need to wrap everything in a try/except block and call code.interact from there, or you could invoke it whenever you wanted too. This has the advantage that you can even trap SystemExit if you want too. Thanks again to everyone! "Michael Hoffman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Joe wrote: > > Actually I would do that everyone else suggested for your use case. I > thought > about trying this method but couldn't imagine that it would actually work! > -- > Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list