MCPcopy Create free account
hub / github.com/ActiveState/code / export

Function export

recipes/Python/440641_Custom_Made_CGI_Module/recipe-440641.py:20–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 raise SystemExit(0)
19
20def export():
21 global string, dictionary, export, decode
22 try:
23 from os import environ
24 string = environ['QUERY_STRING']
25 except:
26 string = None
27 try:
28 temp = string.replace('+', ' ').split('&')
29 for index in range(len(temp)):
30 temp[index] = temp[index].split('=')
31 dictionary = dict()
32 for parameter, value in temp:
33 dictionary[decode(parameter)] = decode(value)
34 except:
35 dictionary = None
36 del export, decode
37
38def decode(string):
39 index = string.find('%')

Callers 1

recipe-440641.pyFile · 0.70

Calls 5

rangeFunction · 0.85
decodeFunction · 0.70
dictClass · 0.50
splitMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected