浏览代码

auto commit

master
jfinn 2 年前
父节点
当前提交
def3099711
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7
    2
      wsps/tasks_loop.py

+ 7
- 2
wsps/tasks_loop.py 查看文件

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)

正在加载...
取消
保存