Skip to main content

Project path strings between Windows, WSL, MSYS2/Mingw, and POSIX conventions.

Project description

pypathdub

pypathdub projects path strings between Windows, WSL, MSYS2/Mingw, and POSIX conventions.

It is for the common cross-shell case where the producer shell's path shape is not the shape a consumer binary expects.

pypathdub 'C:\work\project\data.local' --fmt python-wsl
# /mnt/c/work/project/data.local

pypathdub 'C:\work\project\data.local' --fmt python-mingw
# /c/work/project/data.local

Python

from pypathdub import normalizePathString

print(normalizePathString(r"C:\work\project\data.local", "python-mingw"))

normalize_path_string is also exported as a Python-style alias.

From a source checkout, the compatibility script is:

python .\scripts\normalize_path_string.py 'C:\work\project\data.local' --fmt python-mingw

Formats

  • python-win
  • python-winabsolute
  • python-nix
  • python-mingw
  • python-wsl
  • osnative-win
  • osnative-winabsolute
  • osnative-nix
  • osnative-mingw
  • osnative-wsl

The python-* formats use Python-literal-safe separators. The osnative-* formats use the native path style for that convention.

Drive-backed Windows paths cannot be projected to plain nix; use Mingw or WSL when the drive mount is part of the target convention.

The winabsolute formats require a Windows drive or UNC authority. Relative paths and plain POSIX absolute paths are rejected instead of resolved against the current working directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypathdub-0.2.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypathdub-0.2.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file pypathdub-0.2.3.tar.gz.

File metadata

  • Download URL: pypathdub-0.2.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pypathdub-0.2.3.tar.gz
Algorithm Hash digest
SHA256 04fa4597a9b7861c1bfb6fde0d438c9289445d6c8d0bac25948ccbc341b12b3f
MD5 0ed50960d75daafe764ee998d3dc5112
BLAKE2b-256 40a5bd8e9d7d7f87ae7d2279a9d72c7a90d6bf7c20b2b7d2e53c662e85948d18

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypathdub-0.2.3.tar.gz:

Publisher: publish.yml on warrentc3/pypathdub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pypathdub-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: pypathdub-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pypathdub-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ffc198ab861e1d484e207d43671015d01ce171bbcac8bdb0448e071a17eadd7d
MD5 6a12cd0916e6a2f07e305e6314d431e6
BLAKE2b-256 031e0607ac4c0a4aeb154ea8b218e0d2dda6b9b73ac43fab6e496785a891703f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypathdub-0.2.3-py3-none-any.whl:

Publisher: publish.yml on warrentc3/pypathdub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page