pypathutil package

Submodules

pypathutil.common module

common.py

pypathutil.common.add(folder: str, path: str, head: bool, separator: str = ':', remove_duplicates: bool = True, remove_non_folders: bool = True, remove_non_abs: bool = True) → str[source]
pypathutil.common.clean(path: str, separator: str = ':', remove_duplicates: bool = True, remove_non_folders: bool = True, remove_non_abs: bool = True) → str[source]

returns a reduced version of the path. This means without repetition and without parts which are not folders. :param remove_non_abs: :param remove_non_folders: :param remove_duplicates: :param path: :param separator: :return:

pypathutil.common.do_remove_duplicates(path: str, separator: str = ':') → str[source]
pypathutil.common.do_remove_non_abs(path: str, separator: str = ':') → str[source]
pypathutil.common.do_remove_non_folders(path: str, separator: str = ':') → str[source]
pypathutil.common.find_in_path(path: str, app: str, separator: str = ':', strict: bool = False) → None | str[source]

Return the full path if found, None otherwise :param path: :param app: :param separator: :param strict: :return:

pypathutil.common.find_in_standard_path(app: str) → None | str[source]

Find in the standard path :param app: :return:

pypathutil.common.is_exe(path: str) → bool[source]
pypathutil.common.remove(folder: str, path: str, separator: str = ':', remove_duplicates: bool = True, remove_non_folders: bool = True, remove_non_abs: bool = True) → str[source]

pypathutil.configs module

All configurations for pypathutil

class pypathutil.configs.ConfigFolder[source]

Bases: Config

A folder name

folder = <pytconf.param.Unique object>
class pypathutil.configs.ConfigHead[source]

Bases: Config

Configure whether we need head or tail

head = True
class pypathutil.configs.ConfigOps[source]

Bases: Config

Which operations to perform on the path

remove_duplicates = True
remove_non_abs = True
remove_non_folders = True
class pypathutil.configs.ConfigPath[source]

Bases: Config

The existing path

path = <pytconf.param.Unique object>
class pypathutil.configs.ConfigSeparator[source]

Bases: Config

Parameters for configuring the separator

separator = ':'

pypathutil.main module

main

pypathutil.main.add() → None[source]
pypathutil.main.clean() → None[source]
pypathutil.main.main()[source]
pypathutil.main.remove() → None[source]

pypathutil.static module

version which can be consumed from within the module

Module contents

Initialize the module