From 0ccd5a745a5ce1592cbb754f1ef966115d72d669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 18 Feb 2019 15:45:42 +0100 Subject: [PATCH] Pathlib --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 998c8b1..8d933f5 100644 --- a/README.md +++ b/README.md @@ -964,31 +964,31 @@ Pathlib ```python from pathlib import Path -pwd = Path() - = Path('' [, '', , ...]) - = / '' / '' +pwd = Path() + = Path('' [, '', , ...]) + = / '' / '' ``` ```python - = .exists() - = .is_file() - = .is_dir() - = .iterdir() + = .exists() + = .is_file() + = .is_dir() + = .iterdir() ``` ```python - = .glob('') # Returns all matches. - = .resolve() # Makes path absolute. - = .open() # Opens file. + = .glob('') # Returns all matches. + = .resolve() # Makes path absolute. + = .open() # Opens file. ``` ```python - = str() # Returns path as string. - = .name # Final component. - = .stem # Final component without extension. - = .suffix # Final component's extension. - = .parent # Path without final component. - = .parts # All components as strings. + = str() # Returns path as string. + = .name # Final component. + = .stem # Final component without extension. + = .suffix # Final component's extension. + = .parent # Path without final component. + = .parts # All components as strings. ```