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 details)
Built Distribution
File details
Details for the file windows_pathlib-0.0.1.tar.gz
.
File metadata
- Download URL: windows_pathlib-0.0.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a65d0e722b8d3d10ae20ed982df055fdb56727c2798df55ae418c7504f7f836 |
|
MD5 | d183629cb19c0f791725ce208effe849 |
|
BLAKE2b-256 | fa2ae0733dbad368b96561cdf6b72fe9efa8d1d7cf66bd34627b2fdc055db579 |
File details
Details for the file windows_pathlib-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: windows_pathlib-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed82734d9cca6760ee3e17fbfe1dddb24f74b6b718442034af01562f2e17c53b |
|
MD5 | 7a2cd4a5ee74887e3e2cb42226f0aa3e |
|
BLAKE2b-256 | be7b79e4b80a32e92ab00ed3dda2c291a45b40aa1cdb78af05c2df65983a3bf7 |