Answers for "open json file in current directory python"

1

open json file in current directory python

import os
script_dir = os.path.dirname(__file__)
file_path = os.path.join(script_dir, 'relative/path/to/file.json')
with open(file_path, 'r') as fi:
    pass
Posted by: Guest on October-19-2020

Code answers related to "open json file in current directory python"

Code answers related to "Javascript"

Browse Popular Code Answers by Language