On Mon, 19 Aug 2013 18:48:19 +0200, Tamer Higazi wrote:

> Hi people!
> 
> I have asked myself a question, if there is a opposite of "__init__.py"
> like "__del__.py" ?!

No. If you want to run code when your application is shutting down, run 
it just before your code finishes:

def main():
   do_this()
   do_that()


if __name__ == '__main__':
    main()
    shutdown()


If you care about code running even if an exception takes place:


if __name__ == '__main__':
    try:
        main()
    finally:
        shutdown()


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to