Python Forum
Is pathlib a viable replacement for os.path?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is pathlib a viable replacement for os.path?
#5
I only want to add that there is an issue (or bug) with pathlib: if you try to subclass directly pathlib.Path in order to add your own custom methods, it FAILS!

A simple solution seems to subclass the concrete class type(pathlib.Path()) instead.
Reply


Messages In This Thread
RE: Is pathlib a viable replacement for os.path? - by Gribouillis - Jan-13-2018, 09:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  replacement for fpformat.extract GbSig1998 4 368 Apr-12-2024, 06:15 PM
Last Post: deanhystad
  String replacement in DB WJSwan 0 781 Dec-28-2022, 05:31 AM
Last Post: WJSwan
Exclamation IndexError: Replacement index 2 out of range for positional args tuple - help? MrKnd94 2 6,750 Oct-14-2022, 09:57 PM
Last Post: MrKnd94
  Pathlib import not working chriswrcg 9 3,900 May-29-2022, 07:37 PM
Last Post: snippsat
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,263 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  deleting an empty Dir, using pathlib.Path tester_V 9 5,992 Jul-01-2021, 01:53 PM
Last Post: Gribouillis
  Trying to pathlib instead of os.path tester_V 4 2,558 Jun-22-2021, 04:15 AM
Last Post: tester_V
  pathlib destpath.exists() true even file does not exist NaN 9 4,770 Dec-01-2020, 12:43 PM
Last Post: NaN
  Extract the largest value from a group without replacement (beginner) preliator 1 2,122 Aug-12-2020, 01:56 PM
Last Post: DPaul
  Simple automated SoapAPI Call with single variable replacement from csv asaxty 1 2,149 Jun-30-2020, 06:38 PM
Last Post: asaxty

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020