Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
 
PREVIOUS NEXT
Tagged: #open #json #file #current #directory #python
ADD COMMENT
Topic
Name
4+3 =