This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> p = StringPath("foo/bar/baz") | |
>>> p | |
StringPath(PosixPath('foo/bar/baz')) | |
>>> isinstance(p, pathlib.Path) | |
True | |
>>> isinstance(p, str) | |
True | |
>>> str(p) | |
'foo/bar/baz' | |
>>> p + 'hello' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# coding: utf-8 | |
# Written by Koos Zevenhoven, after the python-ideas discussion | |
# and code by 'Random832' here: | |
# https://mail.python.org/pipermail//python-ideas/2016-April/039448.html | |
import types | |
import sys | |
import importlib |