sys.exitfunc() : Sys : Buildin Module PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Module » Sys »

 

sys.exitfunc()


import sys

prev_exit_func = getattr(sys, 'exitfunc', None)

def my_exit_func(old_exit = prev_exit_func):
  if old_exit is not None and callable(old_exit):
     old_exit()

sys.exitfunc = my_exit_func



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Module
» Sys