import json
import sys
with open(sys.argv[1]) as data_file:
    data = json.load(data_file, strict=False)
data = data['runtimeSettings'][0]['handlerSettings']['publicSettings']['environment_variables']
commands=""
for key, value in data.items():
    commands=commands+'export '+key+'="'+value+'";'
print commands

@@ -296,18 +296,18 @@
 ;'%0Aprint
- 
+(
 commands
 %0A
@@ -305,9 +305,10 @@
 commands
+)
 %0A

Fix python syntax error