Package: lib-path
lib_pathVersion v1.0.4 as of 2023-07-21 seeChangelogfunctions to handle string paths, were pathlib is not applicable.
also works correctly with windows UNC Paths like //server/share/directory/../../directory2
deprecatedautomated tests, Github Actions, Documentation, Badges, etc. are managed withPizzaCutter(cookiecutter on steroids)Python version required: 3.8.0 or newertested on recent linux with python 3.8, 3.9, 3.10, 3.11, 3.12-dev, pypy-3.9, pypy-3.10 - architectures: amd64100% code coverage, flake8 style checking ,mypy static type checking ,tested underLinux, macOS, Windows, automatic daily builds and monitoringTry it OnlineUsageUsage from CommandlineInstallation and UpgradeRequirementsAcknowledgementsContributeReport IssuesPull RequestCode of ConductLicenseChangelogTry it OnlineYou might try it right away in Jupyter Notebook by using the “launch binder” badge, or clickhereUsageexpand_filelist_subdirectories(l_paths:List[pathlib.Path],expand_subdirs:bool=True)->List[pathlib.Path]get_basename_without_extension(path_file:pathlib.Path)->strget_current_dir()->pathlib.Pathget_files_and_directories_from_list_of_paths(l_paths:List[pathlib.Path])->Tuple[List[pathlib.Path],List[pathlib.Path]]get_files_from_directory_recursive(path_base_dir:pathlib.Path)->List[pathlib.Path]is_windows_network_unc(path:str)->boollog_and_raise_if_not_isdir(directory:pathlib.Path)->Nonelog_and_raise_if_not_isfile(file:pathlib.Path)->Nonelog_and_raise_if_path_does_not_exist(path:pathlib.Path)->Nonepath_join_posix(path:str,*paths:str)path_remove_trailing_slashes(path:str)->strpath_starts_with_windows_drive_letter(path:str)->boolstrip_and_replace_backslashes(path:str)->strsubstract_windows_drive_letter(path:str)->strUsage from CommandlineUsage: lib_path [OPTIONS] COMMAND [ARGS]...

  path related function - deprecated

Options:
  --version                     Show the version and exit.
  --traceback / --no-traceback  return traceback information on cli
  -h, --help                    Show this message and exit.

Commands:
  info  get program informationsInstallation and UpgradeBefore You start, its highly recommended to update pip and setup tools:python -m pip --upgrade pip
python -m pip --upgrade setuptoolsto install the latest release from PyPi via pip (recommended):python -m pip install --upgrade lib_pathto install the latest release from PyPi via pip, including test dependencies:python -m pip install --upgrade lib_path[test]to install the latest version from github via pip:python -m pip install --upgrade git+https://github.com/bitranox/lib_path.gitinclude it into Your requirements.txt:# Insert following line in Your requirements.txt:
# for the latest Release on pypi:
lib_path

# for the latest development version :
lib_path @ git+https://github.com/bitranox/lib_path.git

# to install and upgrade all modules mentioned in requirements.txt:
python -m pip install --upgrade -r /<path>/requirements.txtto install the latest development version, including test dependencies from source code:# cd ~
$ git clone https://github.com/bitranox/lib_path.git
$ cd lib_path
python -m pip install -e .[test]via makefile:
makefiles are a very convenient way to install. Here we can do much more,
like installing virtual environments, clean caches and so on.# from Your shell's homedirectory:$gitclonehttps://github.com/bitranox/lib_path.git$cdlib_path# to run the tests:$maketest# to install the package$makeinstall# to clean the package$makeclean# uninstall the package$makeuninstallRequirementsfollowing modules will be automatically installed :## Project Requirementscli_exit_toolslib_detect_testenvlib_platformAcknowledgementsspecial thanks to “uncle bob” Robert C. Martin, especially for his books on “clean code” and “clean architecture”ContributeI would love for you to fork and send me pull request for this project.
-please ContributeLicenseThis software is licensed under theMIT license—Changelogv1.0.42023-07-21:update requirementsv1.0.32023-07-21:require minimum python 3.8remove python 3.7 testsintroduce PEP517 packaging standardintroduce pyproject.toml build-systemremove mypy.iniremove pytest.iniremove setup.cfgremove setup.pyremove .bettercodehub.ymlremove .travis.ymlupdate black configclean ./tests/test_cli.pyadd codeql badgemove 3rd_party_stubs outside the src directory to./.3rd_party_stubsadd pypy 3.10 testsadd python 3.12-dev testsv1.0.22020-10-09: service releaseupdate travis build matrix for linux 3.9-devupdate travis build matrix (paths) for windows 3.9 / 3.101.0.12019-07-13:dropped Python 3.4/3.5 Supportstrict mypy type checking1.0.02019-04-19: Initial public release, PyPi Release