DEV Community

Python I/O made easy with filehandlers

Reece Dunham on September 27, 2019

Hello everybody, Today I am here to explain how my library, filehandlers, makes basic Python I/O easier for everyone. Let me start off by saying t...
Collapse
 
rhymes profile image
rhymes

Hi Reece!

There's obviously nothing wrong in reinventing the wheel but since I didn't see it mentioned I suspected you were not aware about Python's pathlib module in the standard library.

It has concepts of abstract and concrete paths. You can create files, directories, read and write both binary and text content.

It was created exactly for the reason you mention, how cumbersome the low level stuff was.

Take a look, maybe it serves all your needs or maybe you can just wrap yours on top of it for what's missing

Collapse
 
rdil profile image
Reece Dunham

Very interesting! I indeed didn't know about this, and will try to come up with some kind of wrapper for it. Thanks for pointing it out :)