3 [> @ sv d Z ddlmZ yddlmZ W n ek r8 dZY nX dZddlZdd Zdd dZdd Z dddZ dd ZdS )aj 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. )FunctionType) ClassTypeTFNc C s | j }| j}||k}d|k}d|k}|o*|}|o>|d |d k}|rTtjj|d pVd}|od|j|k}|spd} n.|r| rd} n|r| rd} n|sd} nd} | |||fS ) zReturn (kind,module,locals,globals) for a frame 'kind' is one of "exec", "module", "class", "function call", or "unknown". __module____name__Nexecmoduleclassz function callunknown)f_locals f_globalssysmodulesget__dict__) framer r Z sameNamespaceZ hasModuleZhasNameZsameNamer ZnamespaceIsModulekind r /usr/lib64/python3.6/advice.pygetFrameInfo&