OCDocker.Toolbox.Printing module

Sets of classes and functions that are used to print informations.

Usage:

import OCDocker.Toolbox.Printing as ocprint

OCDocker.Toolbox.Printing.print_error(message, force=False)[source]

Print error. [DEPRECATED]

Parameters:
  • message (str) – Message to be printed.

  • force (bool, optional) – Forces the system to print the message, even if output_level is turning it off (USE WITH CAUTION!!!).

Return type:

None

OCDocker.Toolbox.Printing.print_error_log(message, logfile, mode='a')[source]

Function to print error into log.

Parameters:
  • message (str) – Message to be printed.

  • logfile (str) – Log file to be used.

  • mode (str, optional) – Mode to open the file. Default is ‘a’ (append).

Return type:

None

OCDocker.Toolbox.Printing.print_info(message, force=False)[source]

Function to print info.

Parameters:
  • message (str) – Message to be printed.

  • force (bool, optional) – Forces the system to print the message, even if output_level is turning it off (USE WITH CAUTION!!!).

Return type:

None

OCDocker.Toolbox.Printing.print_info_log(message, logfile, mode='a')[source]

Function to print info into log.

Parameters:
  • message (str) – Message to be printed.

  • logfile (str) – Log file to be used.

  • mode (str, optional) – Mode to open the file. Default is ‘a’ (append).

Return type:

None

OCDocker.Toolbox.Printing.print_section(n, name, logName='OCDocker_Progress.out')[source]

Print the section header and write progress to the progress file.

Parameters:
  • n (int) – Section number.

  • name (str) – Section name (empty string for no log).

  • logName (str, optional) – Log file name. Default is “OCDocker_Progress.out”.

Return type:

None

OCDocker.Toolbox.Printing.print_sorry()[source]

Function to print sorry message.

Return type:

None

OCDocker.Toolbox.Printing.print_subsection(n, name, logName='OCDocker_Progress.out')[source]

Print the subsection header in progress file.

Parameters:
  • n (int) – Subsection number.

  • name (str) – Subsection name.

  • logName (str) – Log file name. Default is “OCDocker_Progress.out”.

Return type:

None

OCDocker.Toolbox.Printing.print_success(message, force=False)[source]

Print success. [DEPRECATED]

Parameters:
  • message (str) – Message to be printed.

  • force (bool, optional) – Forces the system to print the message, even if output_level is turning it off (USE WITH CAUTION!!!).

Return type:

None

OCDocker.Toolbox.Printing.print_success_log(message, logfile, mode='a')[source]

Function to print success into log.

Parameters:
  • message (str) – Message to be printed.

  • logfile (str) – Log file to be used.

  • mode (str, optional) – Mode to open the file. Default is ‘a’ (append).

Return type:

None

OCDocker.Toolbox.Printing.print_warning(message, force=False)[source]

Function to print warning. [DEPRECATED]

Parameters:
  • message (str) – Message to be printed.

  • force (bool, optional) – Forces the system to print the message, even if output_level is turning it off (USE WITH CAUTION!!!).

Return type:

None

OCDocker.Toolbox.Printing.print_warning_log(message, logfile, mode='a')[source]

Function to print warning into log.

Parameters:
  • message (str) – Message to be printed.

  • logfile (str) – Log file to be used.

  • mode (str, optional) – Mode to open the file. Default is ‘a’ (append).

Return type:

None

OCDocker.Toolbox.Printing.printv(message)[source]

Function to print if verbosity mode is set.

Parameters:

message (str) – Message to be printed.

Return type:

None

OCDocker.Toolbox.Printing.section(n, name)[source]

Return the section header.

Parameters:
  • n (int) – Section number.

  • name (str) – Section name.

Returns:

Section header.

Return type:

str

OCDocker.Toolbox.Printing.subsection(n, name)[source]

Return the subsection header.

Parameters:
  • n (int) – Subsection number.

  • name (str) – Subsection name.

Returns:

Subsection header.

Return type:

str