hdlmake.util package¶
Submodules¶
hdlmake.util.path module¶
This module provides a set of functions that are commonly used in HDLMake
-
hdlmake.util.path.
commonpath
(path1, path2, common=None)¶ Return the common path for the provided paths
-
hdlmake.util.path.
compose
(path, base=None)¶ Get the relative path composition of the provided path
-
hdlmake.util.path.
flatten_list
(sth)¶ Convert the argument in a list, being an empty list if none
-
hdlmake.util.path.
is_abs_path
(path)¶ Check if the given path is absolute
-
hdlmake.util.path.
is_rel_path
(path)¶ Check if the given path is relative
-
hdlmake.util.path.
pathsplit
(path, rest=None)¶ Split the provided path and return as a tuple
-
hdlmake.util.path.
rel2abs
(path, base=None)¶ converts a relative path to an absolute path.
@param path the path to convert - if already absolute, is returned without conversion. @param base - optional. Defaults to the current directory. The base is intelligently concatenated to the given relative path. @return the relative path of path from base
-
hdlmake.util.path.
relpath
(path1, path2=None)¶ Return the relative path of one path with respect to the other
-
hdlmake.util.path.
svn_basename
(url)¶ Get basename from an SVN url
-
hdlmake.util.path.
svn_parse
(url)¶ Check if link to a SVN repo seems to be correct. Filter revision number
-
hdlmake.util.path.
url_basename
(url)¶ Get basename from an url
-
hdlmake.util.path.
url_parse
(url)¶ Check if link to a Git repo seems to be correct. Filter revision number and branch
hdlmake.util.termcolor module¶
ANSII Color formatting for output in terminal.
-
hdlmake.util.termcolor.
colored
(text, color=None, on_color=None, attrs=None)¶ Colorize text.
- Available text colors:
- red, green, yellow, blue, magenta, cyan, white.
- Available text highlights:
- on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white.
- Available attributes:
- bold, dark, underline, blink, reverse, concealed.
- Example:
- colored(‘Hello, World!’, ‘red’, ‘on_grey’, [‘blue’, ‘blink’]) colored(‘Hello, World!’, ‘green’)
-
hdlmake.util.termcolor.
cprint
(text, color=None, on_color=None, attrs=None, **kwargs)¶ Print colorize text.
It accepts arguments of print function.
Module contents¶
This package provides common utils… but not used ad package yet!