Lines Matching +full:line +full:- +full:power
40 The print-out of the resulting var dictionary is:
204 …This function is useful for parsing a line of program output or data that is in the following form:
209 Current Limit State: No Active Power Limit
222 No Active Power Limit
265 [0]: Current Limit State: No Active Power Limit
266 [1]: Exception actions: Hard Power Off & Log Event to SEL
267 [2]: Power Limit: 0 Watts
278 [current_limit_state]: No Active Power Limit
279 [exception_actions]: Hard Power Off & Log Event to SEL
288 headers[0][0]: content-length
291 headers[1][0]: x-xss-protection
301 [content-length]: 559
302 [x-xss-protection]: 1; mode=block
304 Another example containing a sub-list (see process_indent description below):
313 …Note that the 2 qualifications for containing a sub-list are met: 1) 'Additional Device Support' h…
328 …process_indent This indicates that indented sub-dictionaries and sub-lists are to…
329 … processed as such. An entry may have a sub-dict or sub-list if 1) It has
354 parent_indent = len(key_value_list[0]) - len(key_value_list[0].lstrip())
359 indent = len(entry) - len(entry.lstrip())
362 # This line is indented compared to the parent entry and the parent entry has no value.
370 # If delim is found anywhere in the sub_list, we'll process as a sub-dictionary.
387 # If delim is found anywhere in the sub_list, we'll process as a sub-dictionary.
397 Convert a buffer with a key/value string on each line to a dictionary and return it.
399 Each line in the out_buf should end with a \n.
407 Current Limit State: No Active Power Limit
408 Exception actions: Hard Power Off & Log Event to SEL
409 Power Limit: 0 Watts
420 [current_limit_state]: No Active Power Limit
421 [exception_actions]: Hard Power Off & Log Event to SEL
427 out_buf A buffer with a key/value string on each line. (See docstring of
440 Convert a buffer containing multiple sections with key/value strings on each line to a list of
464 Access Available : call-in / callback
493 [access_available]: call-in / callback
500 … out_buf A buffer with multiple secionts of key/value strings on each line.
501 … Sections are delimited by one or more blank lines (i.e. line feeds). (See
512 def create_field_desc_regex(line): argument
514 Create a field descriptor regular expression based on the input line and return it.
520 Given the following input line:
522 -------- ------------ ------------------ ------------------------
529 - An 8 character field
530 - 3 spaces
531 - A 12 character field
532 - One space
533 - An 18 character field
534 - One space
535 - A 24 character field
538 …line A line consisting of dashes to represent fields and spaces to deli…
542 # Split the line into a descriptors list. Example:
544 # descriptors[0]: --------
547 # descriptors[3]: ------------
548 # descriptors[4]: ------------------
549 # descriptors[5]: ------------------------
550 descriptors = line.split(" ")
577 …The first entry in report_list must be a header line consisting of column names delimited by white…
588 rl[0]: Filesystem 1K-blocks Used Available Use% Mounted on
597 [1k-blocks]: 247120
604 [1k-blocks]: 247120
611 …there is never any data in field 7 so things work out nicely. A caller could do some pre-processi…
616 …If the 2nd line of report data is a series of dashes and spaces as in the following example, that …
619 The 2nd line of data is like this:
621 -------- ------------ ------------------ ------------------------
625 …report_list A list where each entry is one line of output from a report. The …
626 … entry must be a header line which contains column names. Column names
634 # If we don't have at least a descriptor line and one line of data, return an empty array.
638 report_list = [re.sub("\\|", "", line) for line in report_list]
645 if re.match(r"^-[ -]*$", report_list[1]):
646 # We have a field descriptor line (as shown in example 2 above).
649 pad_format_string = "%-" + str(field_desc_len) + "s"
650 # The field descriptor line has served its purpose. Deleting it.
653 # Process the header line by creating a list of column names.
657 # Pad the line with spaces on the right to facilitate processing with field_desc_regex.
666 line = report_line.split()
668 # Pad the line with spaces on the right to facilitate processing with field_desc_regex.
670 line = list(
674 line_dict = collections.OrderedDict(zip(columns, line))
676 line_dict = DotDict(zip(columns, line))
692 Filesystem 1K-blocks Used Available Use% Mounted on
701 [1k-blocks]: 247120
708 [1k-blocks]: 247120
715 - Process the output of a ps command.
716 - Process the output of an ls command (the caller would need to supply column names)
719 …out_buf A text report. The first line must be a header line which contains
843 The selection process is directed only at the first-level entries of the structure.
893 results, include only NON-matching entries in the results.
922 resulting sub-dictionaries.