##// END OF EJS Templates
ipy_leo: notes on leo log
vivainio -
Show More
@@ -150,11 +150,12 b' def add_file(self,fname):'
150 150 p2 = c.currentPosition().insertAfter()
151 151
152 152 def push_script(p):
153 script = g.getScript(c,p,useSelectedText=False,forcePythonSentinels=True,useSentinels=True)
153 script = g.getScript(c,p,useSelectedText=False,forcePythonSentinels=True,useSentinels=False)
154 154 script = g.splitLines(script + '\n')
155 155 script = ''.join(z for z in script if z.strip())
156 156 ip.runlines(script)
157 print "- Script end -"
157 g.es('ipy script:',p.headString())
158 print " ->"
158 159
159 160 def eval_body(body):
160 161 try:
@@ -168,6 +169,7 b' def push_variable(p,varname):'
168 169 body = p.bodyString()
169 170 val = eval_body(body.strip())
170 171 ip.user_ns[varname] = val
172 g.es('ipy var:',varname)
171 173
172 174 def push_from_leo(p):
173 175 # headstring without @ are just scripts
General Comments 0
You need to be logged in to leave comments. Login now