SkillAgentSearch skills...

Pathology

A subclass of pathlib's Path that adds a script_dir() method

Install / Use

/learn @the-gigi/Pathology
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

pathology

Provide 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.path 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

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated1d ago
Forks5

Languages

Python

Security Score

85/100

Audited on Mar 29, 2026

No findings