I have two files, one is in the webroot, and another is a bootstrap located one folder above the web root (this is CGI programming by the way).
The index file in the web
try this:
def initialize(): global VAR print('Content-type: text/html\n\n') print(VAR) VAR = 'h' print(VAR)
Without 'global VAR' python want to use local variable VAR and give you "UnboundLocalError: local variable 'VAR' referenced before assignment"