1

Is there something like Perl's END {}-block in python? In Perl that block will execute if the script is being terminated somehow.

I found atexit but it is not working with ctrl+c

I am playing around with Pyro4 and I want to put a ns.unregister() in that block.

Kev Inski
  • 167
  • 9

1 Answers1

1

For my special purpose I found the NS_AUTOCLEAN flag here

Kev Inski
  • 167
  • 9