Browse Source

auto commit

master
jfinn 2 years ago
parent
commit
def3099711
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      wsps/tasks_loop.py

+ 7
- 2
wsps/tasks_loop.py View File

251
 	def add_file(self,file_name,fnx={}):
251
 	def add_file(self,file_name,fnx={}):
252
 		self.files[file_name] = {"ftxt":"",**fnx}
252
 		self.files[file_name] = {"ftxt":"",**fnx}
253
 	def get_scope(self,rfile_obj,file_name):
253
 	def get_scope(self,rfile_obj,file_name):
254
+		return self.scopes["current_scope"]
254
 		return {
255
 		return {
255
 		"scope":self.scopes["current_scope"],
256
 		"scope":self.scopes["current_scope"],
256
 		}
257
 		}
276
 					p(scope_key,rfile_obj)
277
 					p(scope_key,rfile_obj)
277
 					f.close()
278
 					f.close()
278
 					scope_obj = self.get_scope(file_name,rfile_obj)
279
 					scope_obj = self.get_scope(file_name,rfile_obj)
279
-					if self.scope_opt
280
-					exec(ftxt)
280
+					if self.scope_opt == "locals":
281
+						exec(ftxt,scope_obj["globals"],scope_obj["locals"])
282
+					elif self.scope_opt == "globals":
283
+						exec(ftxt,scope_obj["globals"])
284
+					else:
285
+						exec(ftxt)
281
 
286
 
282
 				except Exception as e:
287
 				except Exception as e:
283
 					print("EXCEPT",eflag,e)
288
 					print("EXCEPT",eflag,e)

Loading…
Cancel
Save