Lines Matching +full:sub +full:- +full:frame

47     os.path.normpath(re.sub("/" + pgm_name, "", pgm_file_path)) + os.path.sep
119 Return the function name associated with the indicated stack frame.
122 …stack_frame_ix The index of the stack frame whose function name should be returne…
124 … 1 which is the index of the caller's stack frame. If the caller is the
163 return len(line) - len(line.lstrip(" "))
186 … with the given example, if arg_num is -2 the 2nd parm to the left of the
187 … "=" ("rc" in this case) should be returned. If arg_num is -1, the 1st
189 … If arg_num is less than -2, an entire dictionary is returned. The keys
190 to the dictionary for this example would be -2 and -1.
191 …stack_frame_ix The stack frame index of the target function. This value must be …
192 … greater. 1 would indicate get_arg_name's stack frame. 2 would be the
193 caller of get_arg_name's stack frame, etc.
235 'Programmer error - Variable "stack_frame_ix" has an'
259 frame,
268 "Programmer error - The caller has asked for"
269 + ' information about the stack frame at index "'
274 + " entries. Therefore the stack frame index is out"
290 module = inspect.getmodule(frame)
292 …# Though one would expect inspect.getsourcelines(frame) to get all module source lines if the fram…
296 line_ix = cur_line_no - source_line_num - 1
298 source_lines, source_line_num = inspect.getsourcelines(frame)
299 line_ix = cur_line_no - source_line_num
303 print_varx("frame", frame, indent=debug_indent + 2)
319 # work-around below for this deficiency.
344 aliases.add(re.sub("print_var", "pvar", real_called_func_name))
348 import_name_regex = "([a-zA-Z0-9_]+\\.)?"
356 for start_line_ix in range(line_ix, 0, -1):
365 "Programmer error - Could not find the source line with"
381 end_line_ix -= 1
385 prior_line = source_lines[start_line_ix - 1]
386 prior_line_stripped = re.sub(r"[ ]*\\([\r\n]$)", " \\1", prior_line)
392 start_line_ix -= 1
401 composite_line = re.sub("=[ ]*([^ ])", "= \\1", composite_line, 1)
404 lvalue_string = re.sub(lvalue_regex, "", composite_line)
412 # A non-ordered dict doesn't look as nice when printed but it will do.
414 ix = len(lvalues_list) * -1
422 called_func_name = re.sub(called_func_name_regex, "\\4", composite_line)
423 arg_list_etc = "(" + re.sub(pre_args_regex, "", composite_line)
445 nest_level = -1
456 nest_level -= 1
484 argument = args_list[arg_num - 1]
507 #(CDT) 2016/07/08 15:25:35 - Hi.
517 #(CDT) 2016/08/03 17:12:05 - Hi.
525 #(CDT) 2016/08/03 17:16:25.510469 - Hi.
533 #(CDT) 2016/08/03 17:17:40 - 0 - Hi.
537 #(CDT) 2016/08/03 17:18:47.317339 - 0.000046 - Hi.
562 + " - "
571 time_string = time_string + " - " + elapsed_seconds
573 return time_string + " - " + buffer
587 - A time stamp
588 - The "**ERROR**" string
589 - The caller's buffer string.
599 #(CDT) 2016/08/03 17:12:05 - **ERROR** Oops.
636 …# Consider a single nibble whose signed values can range from -8 to 7 (0x8 to 0x7). A value of 0x7
638 … # set, the value 7 clearly will fit in one nibble. With -8 = 0x8 = 0b1000, one has the smallest
640 … # of -8 to a working_number of 7, this function can accurately calculate the number of bits and
642 working_number = abs(number) - 1
650 return len(bin(working_number)) - 2
666 …# Consider a single nibble whose signed values can range from -8 to 7 (0x8 to 0x7). A value of 0x7
668 … # set, the value 7 clearly will fit in one nibble. With -8 = 0x8 = 0b1000, one has the smallest
670 … # of -8 to a working_number of 7, this function can accurately calculate the number of bits and
672 working_number = abs(number) - 1
689 …# Check to see whether the negative bit is set. This is the left-most bit in the highest order di…
690 negative_mask = 2 ** (num_hex_digits * 4 - 1)
742 Return non-zero if var_value is a type of dictionary and 0 if it is not.
744 …The specific non-zero value returned will indicate what type of dictionary var_value is (see const…
829 … Create a string consisting of function-definition code that can be executed to create constant fmt
895 …When sprint_varx is processing a multi-level object such as a list or dictionary (which in turn may
906 ('sub',
917 [sub]:
922 …of the dictionary entries with the keys 'one', 'two' and 'sub'. The third level is comprised of t…
935 ord_dict[sub]:
936 ord_dict[sub][three]: 3
937 ord_dict[sub][four]: 4
953 ord_dict[sub]: <collections.OrderedDict>
954 ord_dict[sub][three]: 3 <int>
955 ord_dict[sub][four]: 4 <int>
962 ord_dict[sub]: <collections.OrderedDict>
963 ord_dict[sub][three]: 3 <int>
964 ord_dict[sub][four]: 4 <int>
971 ord_dict[sub]:
972 ord_dict[sub][three]: 3 <int>
973 ord_dict[sub][four]: 4 <int>
1022 #(CDT) 2016/08/10 17:34:42.847374 - 0.001285 - Doing this...
1024 #(CDT) 2016/08/10 17:34:42.847510 - 0.000136 - Doing that...
1043 … A bit map to dictate the format of the output. For printing multi-level
1101 col1_width = col1_width - indent
1112 # example, instead of printing -1 as "0x-000000000000001" it will be printed as
1114 var_value = var_value & (2 ** (num_hex_digits * 4) - 1)
1137 "%" + str(indent) + "s%-" + str(col1_width) + "s" + value_format
1148 var_name = re.sub(r".*\[", "[", var_name)
1150 var_name = re.sub(r"[\[\]]", "", var_name)
1167 loc_var_name = re.sub(r".*\[", "[", var_name)
1171 loc_var_name = re.sub(r"[\[\]]", "", loc_var_name)
1246 indent -= 2
1248 col1_width = col1_width - indent
1252 + "s%-"
1308 def sprint_dashes(indent=dft_indent, width=80, line_feed=1, char="-"):
1329 Pre-pend the specified number of characters to the text string (i.e. indent it) and return it.
1355 stack_frame A stack frame (such as is returned by inspect.stack()).
1384 # Get the arg value from frame locals.
1411 # Now we need to print this in a nicely-wrapped way.
1426 -------------------------------------------------------------------------
1430 ------ ------------------------------------------------------------------
1435 -------------------------------------------------------------------------
1439 stack_frame_ix The index of the first stack frame which is to be returned.
1453 # Process each frame in turn.
1482 #(CDT) 2016/08/25 17:54:27 - Executing: func1(x = 1)
1485 …stack_frame_ix The index of the stack frame whose function info should be returne…
1487 … 1 which is the index of the caller's stack frame. If the caller is the
1506 max_width = 160 - (dft_col1_width + 11)
1627 stack_frame_ix The index of the first stack frame which is to be shown in the
1671 #(CDT) 2016/08/25 17:57:36 - Issuing: ls
1677 #(CDT) 2016/08/25 17:57:36 - (test_mode) Issuing: ls
1715 total_time = time.time() - start_time
1914 frame[0].f_locals[var_name]
1915 for frame in inspect.stack()[init_stack_ix:]
1916 if var_name in frame[0].f_locals
1976 return re.sub(password_regex, "********", buffer)
1987 - Expect that there is an sprint_foo_bar function already in existence.
1988 - Create a print_foo_bar function which calls sprint_foo_bar and prints the result.
1989- Create a qprint_foo_bar function which calls upon sprint_foo_bar only if global value quiet is 0.
1990- Create a dprint_foo_bar function which calls upon sprint_foo_bar only if global value debug is 1.
2054 alias = re.sub("print_", "p", func_name)
2055 alias = re.sub("print", "p", alias)