#pathlib — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #pathlib, aggregated by home.social.
-
Now this is an interesting #Python problem. I don't know if it's a #bug, but it's a change in behaviour that I don't see documented.
I upgraded from #Debian 12/Bookworm to 13/Trixie, so the default Python3 changed from 3.11 to 3.13. A script of mine broke, because `pathlib.Path.is_mount()` changed behaviour when the path is a symlink (at least to a directory).
i.e. I'm testing a path that is a symlink. The symlink points to a directory. That directory *is* a mountpoint. The `.is_mount()` test in 3.11 returned True, while in 3.13 it returns False.
This seems wrong to me. Most path-manipulation functions transparently treat symlinks as if they were the pointed-to object unless you pass an option/flag specifically to say you want the symlink itself.
Gonna have to dig to see what else I can find.
#pathlib #path #is_mount #stdlib #behaviour #symlink #filesystem #mountpoint #mount
-
Looking at it first time today. (svg so responds to [ Ctrl + '+' ] didnt think to zoom it before)
Wow! percentages on everything.
I'm amazed! Astounded truly. 140 lines to achieve all of that? And I'm sure I'm doing it all sorts of wrong. But that's a genuine task solved w/ Python in basically a day, but i've been tweeking around w/ the filesystem stuff.
On the data-science bandwagon of course.
Thought I'd re-do my ⇨ *OLD* ⇦ php static cms (did i meantion it's old?) as a python app to learn from that perspective.
see:
https://statecollegeguitarlessons.com/adbI dunno why i want to start by learning how to mess with the filesystem. probably some kind of psychosis. someone has a name for that.
traverse the dirs w/ tuple os.walk i think at that time, abandoned for pathlib - thought, okay: this is pretty easy w/ python! let's try counting file-types, etc. clearly abandoning the cms idea by that time. Also, i see Jupyter Notebook is basically already the thing. so. ha!
-
Looking at it first time today. (svg so responds to [ Ctrl + '+' ] didnt think to zoom it before)
Wow! percentages on everything.
I'm amazed! Astounded truly. 140 lines to achieve all of that? And I'm sure I'm doing it all sorts of wrong. But that's a genuine task solved w/ Python in basically a day, but i've been tweeking around w/ the filesystem stuff.
On the data-science bandwagon of course.
Thought I'd re-do my ⇨ *OLD* ⇦ php static cms (did i meantion it's old?) as a python app to learn from that perspective.
see:
https://statecollegeguitarlessons.com/adbI dunno why i want to start by learning how to mess with the filesystem. probably some kind of psychosis. someone has a name for that.
traverse the dirs w/ tuple os.walk i think at that time, abandoned for pathlib - thought, okay: this is pretty easy w/ python! let's try counting file-types, etc. clearly abandoning the cms idea by that time. Also, i see Jupyter Notebook is basically already the thing. so. ha!
-
Looking at it first time today. (svg so responds to [ Ctrl + '+' ] didnt think to zoom it before)
Wow! percentages on everything.
I'm amazed! Astounded truly. 140 lines to achieve all of that? And I'm sure I'm doing it all sorts of wrong. But that's a genuine task solved w/ Python in basically a day, but i've been tweeking around w/ the filesystem stuff.
On the data-science bandwagon of course.
Thought I'd re-do my ⇨ *OLD* ⇦ php static cms (did i meantion it's old?) as a python app to learn from that perspective.
see:
https://statecollegeguitarlessons.com/adbI dunno why i want to start by learning how to mess with the filesystem. probably some kind of psychosis. someone has a name for that.
traverse the dirs w/ tuple os.walk i think at that time, abandoned for pathlib - thought, okay: this is pretty easy w/ python! let's try counting file-types, etc. clearly abandoning the cms idea by that time. Also, i see Jupyter Notebook is basically already the thing. so. ha!
-
Looking at it first time today. (svg so responds to [ Ctrl + '+' ] didnt think to zoom it before)
Wow! percentages on everything.
I'm amazed! Astounded truly. 140 lines to achieve all of that? And I'm sure I'm doing it all sorts of wrong. But that's a genuine task solved w/ Python in basically a day, but i've been tweeking around w/ the filesystem stuff.
On the data-science bandwagon of course.
Thought I'd re-do my ⇨ *OLD* ⇦ php static cms (did i meantion it's old?) as a python app to learn from that perspective.
see:
https://statecollegeguitarlessons.com/adbI dunno why i want to start by learning how to mess with the filesystem. probably some kind of psychosis. someone has a name for that.
traverse the dirs w/ tuple os.walk i think at that time, abandoned for pathlib - thought, okay: this is pretty easy w/ python! let's try counting file-types, etc. clearly abandoning the cms idea by that time. Also, i see Jupyter Notebook is basically already the thing. so. ha!
-
Looking at it first time today. (svg so responds to [ Ctrl + '+' ] didnt think to zoom it before)
Wow! percentages on everything.
I'm amazed! Astounded truly. 140 lines to achieve all of that? And I'm sure I'm doing it all sorts of wrong. But that's a genuine task solved w/ Python in basically a day, but i've been tweeking around w/ the filesystem stuff.
On the data-science bandwagon of course.
Thought I'd re-do my ⇨ *OLD* ⇦ php static cms (did i meantion it's old?) as a python app to learn from that perspective.
see:
https://statecollegeguitarlessons.com/adbI dunno why i want to start by learning how to mess with the filesystem. probably some kind of psychosis. someone has a name for that.
traverse the dirs w/ tuple os.walk i think at that time, abandoned for pathlib - thought, okay: this is pretty easy w/ python! let's try counting file-types, etc. clearly abandoning the cms idea by that time. Also, i see Jupyter Notebook is basically already the thing. so. ha!