Return a new path pointing to expanduser('~').
(cls)
| 1254 | |
| 1255 | @classmethod |
| 1256 | def home(cls): |
| 1257 | """Return a new path pointing to expanduser('~'). |
| 1258 | """ |
| 1259 | homedir = os.path.expanduser("~") |
| 1260 | if homedir == "~": |
| 1261 | raise RuntimeError("Could not determine home directory.") |
| 1262 | return cls(homedir) |
| 1263 | |
| 1264 | def as_uri(self): |
| 1265 | """Return the path as a URI.""" |