Convert between Linux and Windows path in WSL
Project description
# WSL path converter
Convert between Linux and Windows path in [WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux) (Windows Subsystem for Linux).
## Installation
Either install the latest stable version hosted on [PyPI](https://pypi.org/):
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](https://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention) paths (e.g. remote shares):
wpc -u \samba.example.comshare
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.comshare wpc /mnt/c/autoexec.bat
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file wsl_path_converter-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: wsl_path_converter-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8878b28f45d0a029610811770ae8972bbe62ff8c0e3df39e2d3ebda2ea78773d |
|
MD5 | 4ebd86431ef6522312d6f59945080182 |
|
BLAKE2b-256 | 17ad4f3a36297a9c652e6b544b5cf7d2506aefd90219e0880b3dbb986fe941fe |
File details
Details for the file wsl_path_converter-0.2.0-py2-none-any.whl
.
File metadata
- Download URL: wsl_path_converter-0.2.0-py2-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab6df4de3b653b8745fd9a3575fe926a634aabbfef64cca5b478e7c6933aae94 |
|
MD5 | e059f1888e097f6a2e1a5b5243f9277d |
|
BLAKE2b-256 | 78f0dba9a27727866b8375410eb60d1cdae286cace90aaa823a8f62938b2f280 |