Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/atexit.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@s�dZdgZddlZgZd�Zd�Zeed�rReej�nee_edkr�d�Z	d	�Z
dd
�Zee	�ee
d�eedd
�eed�ndS(s�
atexit.py - allow programmer to define multiple exit functions to be executed
upon normal program termination.

One public function, register, is defined.
tregisteri�NcCs�d}x�tr�tj�\}}}y|||�Wq	tk
rTtj�}q	ddl}tjdIJ|j�tj�}q	Xq	W|dk	r�|d|d|d�ndS(s�run any registered exit functions

    _exithandlers is traversed in reverse order so functions are executed
    last in, first out.
    i�NsError in atexit._run_exitfuncs:iii(	tNonet
_exithandlerstpopt
SystemExittsystexc_infot	tracebacktstderrt	print_exc(RtfuncttargstkargsR((s/sys/lib/python2.7/atexit.pyt_run_exitfuncs
s	


cOstj|||f�|S(sregister a function to be executed upon normal program termination

    func - function to be called at exit
    targs - optional arguments to pass to func
    kargs - optional keyword arguments to pass to func

    func is returned to facilitate usage as a decorator.
    (Rtappend(R
RR((s/sys/lib/python2.7/atexit.pyR%s	texitfunct__main__cCs	dGHdS(Ns
running x1((((s/sys/lib/python2.7/atexit.pytx17scCsd|fGHdS(Nsrunning x2(%r)((tn((s/sys/lib/python2.7/atexit.pytx29scCsd||fGHdS(Nsrunning x3(%r, kwd=%r)((Rtkwd((s/sys/lib/python2.7/atexit.pytx3;siitbarsno kwd args(
t__doc__t__all__RRR
RthasattrRt__name__RRRR(((s/sys/lib/python2.7/atexit.pyt<module>s 						



Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].