Skip to main content

Licence Docs Python PyPI Conda

wslPath

wslPath is a Python module to convert between Windows and POSIX paths in WSL

Install

From PyPI:

pip install wslPath

From Conda:

conda install -c conda-forge wslPath

Usages

import wslPath

# Windows to Posix

## Relative path
pathwin = "hoge\\fuga"
wslPath.to_posix(pathwin)
# -> "hoge/fuga"

## Absolute path
pathwin = "C:\\hoge\\fuga"
wslPath.to_posix(pathwin)
# -> "/mnt/c/hoge/fuga"

# Posix to Windows

## Relative path
pathposix = "hoge/fuga"
wslPath.to_windows(pathposix)
# -> "hoge\\fuga"

## Absolute path
pathposix = "/mnt/c/hoge/fuga"
wslPath.to_windows(pathposix)
# -> "C:\\hoge\\fuga"

# Identify path type (POSIX or Windows)

path = "hoge/fuga"
wslPath.is_posix_path(path)
# -> True

path = "hoge\\fuga"
wslPath.is_posix_path(path)
# -> False

path = "hoge/fuga"
wslPath.is_windows_path(path)
# -> False

path = "hoge\\fuga"
wslPath.is_windows_path(path)
# -> True

Metadata

Release files for wslPath 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wslPath 0.4.2
File Size Uploaded
wslpath-0.4.2.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wslPath 0.4.2
File Interpreter ABI Platform
wslPath-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / wslpath-0.4.2.tar.gz

Download URL wslpath-0.4.2.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5140b75c8918da05eb79e3c6958bce2bb0d578bb7a83236445b644aeb005cdc5
BLAKE2b-256 checksum
How to use checksums
73993d34e3612844fa0609b339e874844a108df7a38d7c1fe4b3b8ea00392969
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / wslPath-0.4.2-py3-none-any.whl

Download URL wslPath-0.4.2-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40365018001f191cea9e57bbe736eb06d40c69a134b6f8611a338b11a3f8e492
BLAKE2b-256 checksum
How to use checksums
99022979d4d5ae5843fc5cbd45aaf27033764abef8b187a77c185e40d90acaa0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

1 release file

0.2.3

1 release file

0.2.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page