open json file in current directory python

Solutions on MaxInterview for open json file in current directory python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "open json file in current directory python"
Arianna
26 Nov 2016
1import os
2script_dir = os.path.dirname(__file__)
3file_path = os.path.join(script_dir, 'relative/path/to/file.json')
4with open(file_path, 'r') as fi:
5    pass