Skip to main content

Python module to convert between Windows and POSIX path in WSL

Project description

Licence Docs Test Python PyPI

wslPath

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

Install

pip install wslPath

Usages

import wslPath

# Windows to Posix

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

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

# Posix to Windows

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

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

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

wslPath-0.2.3.zip (5.9 kB view hashes)

Uploaded Source

Supported by

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