Skip to main content

Add static script_dir() method to pathlib.Path

Project description

# pathology

Provide a a subclass of pathlib's Path that adds a static script_dir() method to Path, which returns the Path to the
directory of the calling script. It could have been just a standalone function, but for discoverability reasons it
seems better to stick it on top of pathlib's Path.

# Usage

It's a drop-in replacement to pathlib's Path:

```
from pathology import Path

print('The script dir is:', Path.script_dir())

```

# TutsPlus

This package was developed as sample code for a TutsPlus article. Check it out:
[How to Write, Package and Distribute a Library in Python](http://code.tutsplus.com/tutorials/how-to-write-package-and-distribute-a-library-in-python--cms-28693)


Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pathology, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size pathology-0.2-py3-none-any.whl (2.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pathology-0.2.tar.gz (1.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page