symbian-qemu-0.9.1-12/python-2.6.1/Doc/c-api/reflection.rst
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 .. highlightlang:: c
       
     2 
       
     3 .. _reflection:
       
     4 
       
     5 Reflection
       
     6 ==========
       
     7 
       
     8 .. cfunction:: PyObject* PyEval_GetBuiltins()
       
     9 
       
    10    Return a dictionary of the builtins in the current execution frame,
       
    11    or the interpreter of the thread state if no frame is currently executing.
       
    12 
       
    13 
       
    14 .. cfunction:: PyObject* PyEval_GetLocals()
       
    15 
       
    16    Return a dictionary of the local variables in the current execution frame,
       
    17    or *NULL* if no frame is currently executing.
       
    18    
       
    19 
       
    20 .. cfunction:: PyObject* PyEval_GetGlobals()
       
    21 
       
    22    Return a dictionary of the global variables in the current execution frame,
       
    23    or *NULL* if no frame is currently executing.
       
    24 
       
    25 
       
    26 .. cfunction:: PyFrameObject* PyEval_GetFrame()
       
    27 
       
    28    Return the current thread state's frame, which is *NULL* if no frame is
       
    29    currently executing.
       
    30 
       
    31 
       
    32 .. cfunction:: int PyEval_GetRestricted()
       
    33 
       
    34    If there is a current frame and it is executing in restricted mode, return true,
       
    35    otherwise false.
       
    36 
       
    37 
       
    38 .. cfunction:: const char* PyEval_GetFuncName(PyObject *func)
       
    39 
       
    40    Return the name of *func* if it is a function, class or instance object, else the
       
    41    name of *func*\s type.
       
    42 
       
    43 
       
    44 .. cfunction:: const char* PyEval_GetFuncDesc(PyObject *func)
       
    45 
       
    46    Return a description string, depending on the type of *func*.
       
    47    Return values include "()" for functions and methods, " constructor",
       
    48    " instance", and " object".  Concatenated with the result of
       
    49    :cfunc:`PyEval_GetFuncName`, the result will be a description of
       
    50    *func*.