def import_json(filename):
 with open(filename) as f:
  json_data = f.read()
 data = json.loads(json_data)
 for (k, v) in data.items():
  host_status[k] = v

def import_json ( filename ) : with open ( filename ) as f : json_data = f . read ( ) data = json . loads ( json_data ) for ( k , v ) in data . items ( ) : host_status [ k ] = v
import a json module .