Skip to main content

Convert between Linux and Windows path in WSL

Project description

WSL path converter

Convert between Linux and Windows path in WSL (Windows Subsystem for Linux).

Installation

Either install the latest stable version hosted on PyPI:

pip install wsl-path-converter

Or clone the source repository and install the bleeding-edge version:

git clone https://github.com/lamyj/wsl-path-converter.git
cd wsl-path-converter
pip install .

If the latter case is run by a regular user, i.e. non-root, the wpc executable will be installed in ~/.local/bin.

Usage

This converter works with Windows path mounted in WSL, either through /etc/fstab or through the mount command.

The executable is called wpc. To convert a Windows path to its Linux counterpart, run it with the -u option:

wpc -u C:\autoexec.bat

This is also valid using UNC paths (e.g. remote shares):

wpc -u \\samba.example.com\share

For the converse operation, i.e. convert a Linux path to its Windows counterpart, use the -w option:

wpc -w /mnt/c/autoexec.bat

If a path unambiguously belongs to either Windows or Linux, the conversion option can be skipped; all previous examples can be run without the option:

wpc C:\autoexec.bat
wpc \\samba.example.com\share
wpc /mnt/c/autoexec.bat

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

wsl-path-converter-0.3.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distributions

wsl_path_converter-0.3.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

wsl_path_converter-0.3.1-py2-none-any.whl (5.1 kB view details)

Uploaded Python 2

File details

Details for the file wsl-path-converter-0.3.1.tar.gz.

File metadata

  • Download URL: wsl-path-converter-0.3.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for wsl-path-converter-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ecaeb3ee7b77282a0e7ee52faab3734546fa2ef49c83f6c839127018d9db1e9d
MD5 7e230764ccaa95a9770a9440c2edae63
BLAKE2b-256 ff8a617a5000ccd3685ddb0294a7f9d32de062922fe03a95546f18dde3150998

See more details on using hashes here.

File details

Details for the file wsl_path_converter-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: wsl_path_converter-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for wsl_path_converter-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a777d0242b1bc72b5cc3dbbe96723ecf47b89772d85455268ef577b5daedbc30
MD5 3090a5e62159910105962b42f312d0a6
BLAKE2b-256 8cea5a1f57901ff0acffcf36430effa9dcd94105069f8ff929bd9e9e2a67ac05

See more details on using hashes here.

File details

Details for the file wsl_path_converter-0.3.1-py2-none-any.whl.

File metadata

  • Download URL: wsl_path_converter-0.3.1-py2-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for wsl_path_converter-0.3.1-py2-none-any.whl
Algorithm Hash digest
SHA256 e25628bdf085e5cf702ac934ebb8869dc7a1e28ce69500faa42dd16f74d5ed15
MD5 3c0d5c7781901801dac5359d76cb0fe2
BLAKE2b-256 038886c22cec3d0ac0e4d8301ad5ab0358405c7625fcb627178f1b6b988dbbf5

See more details on using hashes here.

Supported by

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