B
    ç¹`(  ã               @   s    d Z ddlZddlZdd„ ZdS )a›  Class advice.

This module was adapted from 'protocols.advice', part of the Python
Enterprise Application Kit (PEAK).  Please notify the PEAK authors
(pje@telecommunity.com and tsarna@sarna.org) if bugs are found or
Zope-specific changes are required, so that the PEAK version of this module
can be kept in sync.

PEAK is a Python application framework that interoperates with (but does
not require) Zope 3 and Twisted.  It provides tools for manipulating UML
models, object-relational persistence, aspect-oriented programming, and more.
Visit the PEAK home page at http://peak.telecommunity.com for more information.

$Id: advice.py 25177 2004-06-02 13:17:31Z jim $
é    Nc             C   sô   | j }| j}||k}d|k}d|k}|o*|}|o>|d |d k}|rTtj |d ¡pVd}|od|j|k}t | ¡}	y|	d d  ¡ }
W n   |	d }
Y nX |	d |	d |	d |
f}|s¼d}n*|rÊ|sÊd	}n|rØ|sØd
}n|sâd}nd}|||||fS )z„Return (kind,module,locals,globals) for a frame

    'kind' is one of "exec", "module", "class", "function call", or "unknown".
    Ú
__module__Ú__name__Né   r   é   é   ÚexecÚmoduleÚclasszfunction callÚunknown)	Úf_localsÚ	f_globalsÚsysÚmodulesÚgetÚ__dict__ÚinspectÚgetframeinfoÚstrip)Úframer   r   ZsameNamespaceZ	hasModuleZhasNameZsameNamer   ZnamespaceIsModuleÚ	frameinfoZ
sourcelineZcodeinfoÚkind© r   úW/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/venusian/advice.pyÚgetFrameInfo"   s2    
r   )Ú__doc__r   r   r   r   r   r   r   Ú<module>   s   