On Thu, Jan 14, 2016 at 3:10 PM, Chris Angelico <ros...@gmail.com> wrote:
> On Fri, Jan 15, 2016 at 6:01 AM, Irmen de Jong <irmen.nos...@xs4all.nl> wrote:
>> Either put something like this at the end of your python scripts, to keep 
>> the console open:
>>
>> raw_input("press enter to exit...")
>
> Small qualification: This is 3.5, so you should use input instead of 
> raw_input.
>
> input("Press enter to exit...")

You can also make the interpreter enter the REPL by setting
PYTHONINSPECT, which works for the current process since this gets
checked at exit.

    import os
    os.environ['PYTHONINSPECT'] = '1'

Or use subprocess.Popen to start a new cmd shell attached to the
current console:

    import subprocess
    subprocess.Popen('cmd.exe')
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to