4 points by CodeChunky in: reading files io basic 11 months ago | 2 comments


 
1 point by kas 11 months ago | 1 comment | on: How to Read a File in Python, Write to, plus Append, to a File
In an article that talks about handling files, I feel that `pathlib` should have been mentioned: import pathlib path = pathlib.Path('/path/to/file') with path.open('w') as fptr: print('oh, hai!', file=fptr) (I wonder if identing the block above renders the block as a code block…)
 
1 point by kas 11 months ago | discuss | parent | on: How to Read a File in Python, Write to, plus Append, to a File
(It didn't, damn!)