returns a formatted view of the local variables in a frame
542428
def get_locals(f):
    '''  '''
    return pformat({i:f.f_locals[i] for i in f.f_locals if not i.startswith('__')})
193472
def get_frame_src(f:Frame) -> str:
    ''' 
    '''
    path, line, src, fn = _get_frame(
        inspect.getframeinfo(f)
    )
    return '{}:{} -> {}\n{}'.format(
        path.split(os.sep)[-1],
        line,
        fn,
        repr(src[0][:-1]) # shave off \n
    )
41277
def get_frame_list():
    

    # TODO: use this function in IPS below (less code duplication)

    frame_info_list = []
    frame_list = []
    frame = inspect.currentframe()
    while frame is not None:
        frame_list.append(frame)
        info = inspect.getframeinfo(frame)
        frame_info_list.append(info)
        frame = frame.f_back

    frame_info_list.reverse()
    frame_list.reverse()
    frame_info_str_list = [format_frameinfo(fi) for fi in frame_info_list]

    return frame_list, frame_info_list, frame_info_str_list
1258225
def variables(self):
        ''''''
        return sorted(list(self.mapping.vars.keys()),
                      key = lambda v : self.mapping.vars[v].index)
1101607
def flo(string):
    ''''''
    callers_locals = {}
    frame = inspect.currentframe()
    try:
        outerframe = frame.f_back
        callers_locals = outerframe.f_locals
    finally:
        del frame
    return string.format(**callers_locals)
238961
def view(grid):
    ""
    p_mark, q_mark = player_marks(grid)
    return grid_format % tuple(p_mark if by_p else q_mark if by_q else '.'
                               for by_p, by_q in zip(*map(player_bits, grid)))
311313
def frame(params = nil)
      if params
        frame = params
        self
      else
        if selected.length == 1
          Rect.frame_for_view(selected.first)
        else
          selected.map{|s| Rect.frame_for_view(s)}
        end
      end
    end
1027780
def get_current(self):
        

        where = slice(self._oldest_frame_idx(), self._pos)
        major_axis = pd.DatetimeIndex(deepcopy(self.date_buf[where]), tz='utc')
        return pd.Panel(self.buffer.values[:, where, :], self.items,
                        major_axis, self.minor_axis, dtype=self.dtype)
1022213
def search_stack_for_localvar(varname):
    
    curr_frame = inspect.currentframe()
    print(' * Searching parent frames for: ' + six.text_type(varname))
    frame_no = 0
    while curr_frame.f_back is not None:
        if varname in curr_frame.f_locals.keys():
            print(' * Found in frame: ' + six.text_type(frame_no))
            return curr_frame.f_locals[varname]
        frame_no += 1
        curr_frame = curr_frame.f_back
    print('... Found nothing in all ' + six.text_type(frame_no) + ' frames.')
    return None
1283863
def get_locals(f:Frame) -> str:
    '''  '''
    return pformat({i:f.f_locals[i] for i in f.f_locals if not i.startswith('__')})
94708
def frame_vars_to_xml(frame_f_locals, hidden_ns=None):
    
    xml = ""

    keys = dict_keys(frame_f_locals)
    if hasattr(keys, 'sort'):
        keys.sort()  # Python 3.0 does not have it
    else:
        keys = sorted(keys)  # Jython 2.1 does not have it

    return_values_xml = ''

    for k in keys:
        try:
            v = frame_f_locals[k]
            eval_full_val = should_evaluate_full_value(v)

            if k == RETURN_VALUES_DICT:
                for name, val in dict_iter_items(v):
                    return_values_xml += var_to_xml(val, name, additional_in_xml=' isRetVal="True"')

            else:
                if hidden_ns is not None and k in hidden_ns:
                    xml += var_to_xml(v, str(k), additional_in_xml=' isIPythonHidden="True"',
                                      evaluate_full_value=eval_full_val)
                else:
                    xml += var_to_xml(v, str(k), evaluate_full_value=eval_full_val)
        except Exception:
            pydev_log.exception("Unexpected error, recovered safely.")

    # Show return values as the first entry.
    return return_values_xml + xml
138480
def get_local_variable_from_name(self, variable_name):
        
        return next((v for v in self.variables if v.name == variable_name), None)
303069
def last_frame(obj):
    ""
    plot, renderer, fmt = single_frame_plot(obj)
    plot.update(len(plot))
    return {'text/html': renderer.html(plot, fmt)}
669327
def draw_variable_local(self, size): 
        
        return ss.norm.rvs(loc=self.mu0, scale=self.sigma0, size=size)
415344
def caller_locals():
    """"""
    import inspect
    frame = inspect.currentframe()
    try:
        return frame.f_back.f_back.f_locals
    finally:
        del frame
231958
def get_localvariabletable(self):
          # noqa

        buff = self.get_attribute("LocalVariableTable")
        if buff is None:
            return tuple()

        with unpack(buff) as up:
            return tuple(up.unpack_struct_array(_HHHHH))
810790
function(expr, localScope) {
						var variables = '';

						/**
						 * If scope is a window object, no need to scopebox it
						 */
						if (typeof window !== "undefined" ? localScope !== window : true) {
							for(var i in localScope) {
								variables += 'var ' + i + ' = localScope.' + i + '; ';
							}
						}
						var unbox = '(function() { ' + variables + ' try { return eval(expr);} catch(e) {} })()';
						return eval(unbox);
					}