Best Practices for Handling Paths in Windows.
Project description
windows_pathlib
Best Practices for Handling Paths in Windows.
Have you written code like this?
import os
import pathlib as Path
# In Windows, the desktop can be changed to any location. The desktop is not necessarily located in the home directory.
print(Path(os.path.expanduser("~/Desktop")))
# This does not work.
print(Path("%APPDATA%/Microsoft"))
windows_pathlib can be used for concise writing.
from windows_pathlib import WindowsPathlib as Path
# C:\Users\username\Desktop
print(Path.desktop())
# C:\Users\username\AppData\Roaming\Microsoft
print(Path("%APPDATA%/Microsoft"))
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 Distribution
windows_pathlib-0.0.1.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for windows_pathlib-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed82734d9cca6760ee3e17fbfe1dddb24f74b6b718442034af01562f2e17c53b |
|
MD5 | 7a2cd4a5ee74887e3e2cb42226f0aa3e |
|
BLAKE2b-256 | be7b79e4b80a32e92ab00ed3dda2c291a45b40aa1cdb78af05c2df65983a3bf7 |