i under impression calling script can access namespace of called script. following code section calling script:
x= 'python precision.py' args=shlex.split(x) print args p=subprocess.popen(args) p.wait() result.write("\tprecision = "+str(precision)+", recall = ") where "precision" variable in called script "precision.py". gives nameerror. how fix this?
you can't access this. time have arrived in last line of script, called script has finished executing. therefore variables don't exist more. need send data calling script in other way (such called script printing on standard output , calling script getting there).
even if hadn't finished executing, don't think access variables. in other words, impression wrong :-)
Comments
Post a Comment