def _parse_script(self, script, n=<NUM_LIT:0>):
if n > <NUM_LIT:1000>:<EOL><INDENT>print("<STR_LIT>")<EOL>a = input("<STR_LIT>")<EOL>if a.strip().lower() in ['<STR_LIT:q>', '<STR_LIT>']:<EOL><INDENT>script = None<EOL><DEDENT><DEDENT>if script is None: return [None, None]<EOL>if type(script) in [int,int]:<EOL><INDENT>if script<<NUM_LIT:0>: script = script+len(self.ckeys)<EOL>return ["<STR_LIT>"+str(script), {"<STR_LIT>"+str(script):self[script]}]<EOL><DEDENT>split_script = script.split("<STR_LIT>")<EOL>if len(split_script) is <NUM_LIT:1>:<EOL><INDENT>if self.debug: print("<STR_LIT>")<EOL>if n==<NUM_LIT:0> and script in self.ckeys:<EOL><INDENT>return ['<STR_LIT>', {'<STR_LIT>':self[script]}]<EOL><DEDENT>try:<EOL><INDENT>b = eval(script, self._globals())<EOL>return ['<STR_LIT>', {'<STR_LIT>':b}]<EOL><DEDENT>except:<EOL><INDENT>print()<EOL>print("<STR_LIT>"+str(script)+"<STR_LIT:'>")<EOL>return [None, None]<EOL><DEDENT><DEDENT>expression = split_script[<NUM_LIT:0>].strip()<EOL>varsplit = split_script[<NUM_LIT:1>].split('<STR_LIT:;>')<EOL>stuff = dict()<EOL>for var in varsplit:<EOL><INDENT>s = var.split("<STR_LIT:=>")<EOL>if len(s) == <NUM_LIT:1>:<EOL><INDENT>print(s, "<STR_LIT>")<EOL>return [None, None]<EOL><DEDENT>v = s[<NUM_LIT:0>].strip()<EOL>c = s[<NUM_LIT:1>].strip()<EOL>[x,y] = self._parse_script(c, n+<NUM_LIT:1>)<EOL>if y is None: return [None, None]<EOL>stuff[v] = y[x]<EOL><DEDENT>return [expression, stuff]<EOL>
This takes a script such as "a/b where a=c('current'), b=3.3" and returns
["a/b", {"a":self.columns["current"], "b":3.3}]

You can also just use an integer for script to reference columns by number
or use the column label as the script.

n is for internal use. Don't use it. In fact, don't use this function, user.