Compatibility#

This module provides a common interface for functions that have incompatibilities between python versions. This is an internal module and you shouldn’t import things here in your project as they may be subject to change or disapear without notice.

Note

This module is deprecated and will be refactored. Initially, its purpose was to provide a common interface for some libraries that had different interfaces between python2 and python3. As of now, odoo-tools doesn’t attempt to work on python2 anymore.

odoo_tools.compat.module_path(module, raise_not_found=True)[source]#

A function that returns the path in which the module is located.

Parameters:

module (str) – The name of the module to check.

Returns:

the path of the module.

Return type:

path (Path)

odoo_tools.compat.pipe(args)[source]#

Call the process with std(in,out,err)

Parameters:

args (List<str>) – A list of parameters to be passed to Popen.

Returns:

The returncode of the program

Return type:

returncode (int)