Lemdro.id
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Luis Norambuena@programming.devM to Python@programming.devEnglish · 6 months ago

Python's pathlib module

www.pythonmorsels.com

external-link
message-square
10
fedilink
15
external-link

Python's pathlib module

www.pythonmorsels.com

Luis Norambuena@programming.devM to Python@programming.devEnglish · 6 months ago
message-square
10
fedilink
Python's pathlib module is the tool to use for working with file paths. See pathlib quick reference tables and examples.

via https://mastodon.social/@treyhunner/113504959975116212

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    Nice, mypath.open() is a more semantic alternative to open(my path)

    • unalivejoy@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      Don’t forget about the helper functions mypath.read_text() and mypath.write_text(content)

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        that’s already in the cheatsheet

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      arrow-down
      1
      ·
      6 months ago

      Today I realised, we all prefer semantics matching oriental language semantics.
      English: Open my path.
      Same sentence in Hindi semantics would be: My path open.

Python@programming.dev

python@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !python@programming.dev

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events
Past

November 2023

  • PyCon Ireland 2023, 11-12th
  • PyData Tel Aviv 2023 14th

October 2023

  • PyConES Canarias 2023, 6-8th
  • DjangoCon US 2023, 16-20th (!django 💬)

July 2023

  • PyDelhi Meetup, 2nd
  • PyCon Israel, 4-5th
  • DFW Pythoneers, 6th
  • Django Girls Abraka, 6-7th
  • SciPy 2023 10-16th, Austin
  • IndyPy, 11th
  • Leipzig Python User Group, 11th
  • Austin Python, 12th
  • EuroPython 2023, 17-23rd
  • Austin Python: Evening of Coding, 18th
  • PyHEP.dev 2023 - “Python in HEP” Developer’s Workshop, 25th

August 2023

  • PyLadies Dublin, 15th
  • EuroSciPy 2023, 14-18th

September 2023

  • PyData Amsterdam, 14-16th
  • PyCon UK, 22nd - 25th
🐍 Python project:
  • Python
  • Documentation
  • News & Blog
  • Python Planet blog aggregator
💓 Python Community:
  • #python IRC for general questions
  • #python-dev IRC for CPython developers
  • PySlackers Slack channel
  • Python Discord server
  • Python Weekly newsletters
  • Mailing lists
  • Forum
✨ Python Ecosystem:
  • pyvideo
  • Awesome Python
  • PyCon US 2023 and videos!
🌌 Fediverse
Communities
  • #python on Mastodon
  • c/django on programming.dev
  • c/pythorhead on lemmy.dbzer0.com
Projects
  • Pythörhead: a Python library for interacting with Lemmy
  • Plemmy: a Python package for accessing the Lemmy API
  • pylemmy pylemmy enables simple access to Lemmy’s API with Python
  • mastodon.py, a Python wrapper for the Mastodon API
Feeds
  • Active c/Python posts
  • New c/Python posts
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 50 users / week
  • 356 users / month
  • 1.17K users / 6 months
  • 13 local subscribers
  • 7.1K subscribers
  • 524 Posts
  • 2.9K Comments
  • Modlog
  • mods:
  • Erlingur@programming.dev
  • Jason Novinger@programming.dev
  • Luis Norambuena@programming.dev
  • UI: 0.19.8
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org