-
Hello there is |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Could you provide a little more context? What is it you want path_elements for? |
Beta Was this translation helpful? Give feedback.
-
"published" means it's in the manpage. not published doesn't mean you can't use it - it's just a Python program, after all - but it doesn't come with promises of consistency, documentation, etc. |
Beta Was this translation helpful? Give feedback.
path_elements
(note the more official way is to use theget_path_elements()
method, though neither are considered "published API") works additively - each node created adds itself to the list it got from its parent directory, which it got after amending its parent's, so on all the way up to the root; there's no filtering capability or argument to return a subset of that.If you just want the strings, you can use a relative path, make a pathlib path out of it, and use its
parts
attribute - but you'll still have to add the pieces together - that is,which is probably no simpler than just doi…