Feb-12-2020, 04:03 PM
I obtained a file pathname ending with .lst in the root dir like this:
why did I need the 'str' call ? I thought file_path was a string anyway ?
Is there a way of doing this without the 'str' call as it seems strange I needed it ?
Thanks
for file_path in Path(args.path).glob('**/*.lst'):and I wanted to open the file file_path but needed str(file_path) to do so:
for codeline in open(str(file_path)):
why did I need the 'str' call ? I thought file_path was a string anyway ?
Is there a way of doing this without the 'str' call as it seems strange I needed it ?
Thanks