Skip to main content

Python package for calling wslpath command in WSL environment

Project description

flake8 mypy PyPI version

wslpath-python

This is a simple Python wrapper around wslpath command found in Windows Subsystem for Linux (WSL) environment.

This package contains a single function wslpath that calls the wslpath command with appropriate arguments.

Requirements

Tha package has no additional requirements. Developed and tested in Python 3.9, but it should work in Python 3.5 and above.

Installation

This package can be installed using pip

pip install wslpath-python

Example usage

>>> from wslpath import wslpath
>>>
>>> wslpath(r'C:\Users\macie')
'/mnt/c/Users/macie'
>>>
>>> from pathlib import Path
>>> wslpath(Path(r'C:\Users\macie'))
PosixPath('/mnt/c/Users/macie')
>>>
>>> wslpath('.')
'.'
>>> wslpath('.', force_absolute_path=True)
'/mnt/c/Users/macie/'

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-python-0.0.3.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

wslpath_python-0.0.3-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

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