How to end Runnig program

For instance when I have main loop with

try: except: and finally:

if i run it with Run Alt+Shift+F10 or run Shift+F10

when I end it with Stop Ctrl+F2

I get only

Process finished with exit code 1

and code in finally: close is not executed how can I end program and execute finally part

if I run it from cmd prompt and end with Ctrl+C it is finished properly.

Thx

Ivan

5 comments

Well maybe help on how can I send ctl-c to running program to trigger exception?

0

Hello Ivan,

Well maybe help on how can I send ctl-c to running program to trigger

exception?

This is not currently possible for regular Python scripts. For Django applications,

we have a special wrapper binary that allows sending Ctrl-C to running applications;

we'll likely add an option to use that for the Python script run configuration

as well.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Great I hope in time for 1.1 relese

0

As I can see this is still not in 1.2.1 version any info ?

0

Hello Ivan,

As I can see this is still not in 1.2.1 version any info ?

Indeed, this wasn't implemented in 1.2. Maybe in a later version.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Please sign in to leave a comment.