Trending

#Pathlib

Latest posts tagged with #Pathlib on Bluesky

Latest Top
Trending

Posts tagged #Pathlib

Original post on mindly.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()` […]

0 0 0 0
Post image

💡 Tip #83 en #Python
¡Manipula Rutas de Archivos como un Pro con pathlib 📂✨
¿Sigues usando os.path.join, os.path.dirname, o manual slicing para manejar las rutas de tus archivos?

www.linkedin.com/feed/update/...

#JoseCodeTech #Programacion #AprendePython #PythonTips #Pathlib #CleanCode #Pythonic

0 0 0 0
Awakari App

Pathlib in Python: Modern, Secure File Path Handling When building Python applications, working with files and directories is unavoidable. Traditionally, developers relied on plain strings to repre...

#python #path-traversal #python-security #pathlib #secure-coding

Origin | Interest | Match

0 0 0 0

The wonders of #Python on #Windows (via #MSYS2)...

If you run you Python script using "./script.py", then `Path` from #pathlib becomes `PosixPath`.

If you run the same script using "python script.py" instead, then `Path` becomes `WindowsPath`.

Chers!

0 0 0 0
Preview
Python's pathlib module Python's pathlib module is the tool to use for working with file paths. See pathlib quick reference tables and examples.

In Python, instead of this:

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

I prefer this:

BASE_DIR = pathlib.Path(__file__).resolve().parent.parent

For more on the magic of #Python's #pathlib, check out the article I published last week:

22 3 3 0

This is really nice. I've been making the effort to use #pathlib everywhere so I build the habit. Will be sharing this article with my team as useful learning!

1 0 1 0
Preview
Python's pathlib module Python's pathlib module is the tool to use for working with file paths. See pathlib quick reference tables and examples.

I've updated my new #pathlib article with additional examples, improved wording, and more links to documentation. ✨

One nice thing about finally publishing in text form: #Python folks happily provide (frequently) constructive feedback so I can immediately iterate. 💗

pym.dev/pathlib-module

18 3 3 1