|
@@ -106,7 +106,6 @@ class AclTaskMixin:
|
106
|
106
|
async def ws_conn0(self):
|
107
|
107
|
glob_cl.run_persistent_loop(self)
|
108
|
108
|
print("++++++++++++++++++++++++++")
|
109
|
|
- # oinfo(glob_cl)
|
110
|
109
|
async def ws_conn_once(self,*a,**kw):
|
111
|
110
|
print("\t\tws_conn_once:","AclTaskMixin")
|
112
|
111
|
|
|
@@ -200,9 +199,19 @@ class globCL():
|
200
|
199
|
class RldMan():
|
201
|
200
|
def __init__(self,*a,**kw):
|
202
|
201
|
self.files = {}
|
|
202
|
+ z="ABC"
|
|
203
|
+ self.scopes = {
|
|
204
|
+ "dflt_scope":{"globals":globals(),"locals":locals()}
|
|
205
|
+ "dflt_scope_zloc":{"globals":globals(),"locals":{}}
|
|
206
|
+ "dflt_scope_gscope":{"globals":globals(),"locals":{}}
|
|
207
|
+ "dflt_scope_copy": {"globals":copy.copy(globals()),"locals":copy.copy(locals())}
|
|
208
|
+ # "dflt_scope":{"globals":globals(),"locals":{}}
|
|
209
|
+ }
|
|
210
|
+ self.scopes['current_scope'] = self.scopes['dflt_scope_zloc']
|
|
211
|
+ self.scope_opt = ""
|
203
|
212
|
self.print_tb = 0
|
204
|
|
- self.dflt_scope = {"globals":globals(),"locals":locals()}
|
205
|
|
- self.dflt_scope2 = {"globals":copy.copy(globals()),"locals":copy.copy(locals())}
|
|
213
|
+ # self.dflt_scope = {"globals":globals(),"locals":locals()}
|
|
214
|
+ # self.dflt_scope2 = {"globals":copy.copy(globals()),"locals":copy.copy(locals())}
|
206
|
215
|
|
207
|
216
|
base_path = "/usr/games/repos/ign4/py_rld/djc/rdir1/"
|
208
|
217
|
|
|
@@ -241,6 +250,14 @@ class RldMan():
|
241
|
250
|
p("add files???",file)
|
242
|
251
|
def add_file(self,file_name,fnx={}):
|
243
|
252
|
self.files[file_name] = {"ftxt":"",**fnx}
|
|
253
|
+ def get_scope(self,rfile_obj,file_name):
|
|
254
|
+ return {
|
|
255
|
+ "scope":self.scopes["current_scope"],
|
|
256
|
+ }
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+ # rfile_obj.get("scope")
|
|
260
|
+ # if
|
244
|
261
|
def rld_file(self,file_name,ret= {"errs":{},"all":{},"alle":{},},**kw):
|
245
|
262
|
if file_name in self.files:
|
246
|
263
|
rfile_obj = self.files[file_name]
|
|
@@ -255,9 +272,11 @@ class RldMan():
|
255
|
272
|
try:
|
256
|
273
|
f = open(file_name,"r")
|
257
|
274
|
ftxt = f.read()
|
258
|
|
- scope_key = rfile_obj.get("scope")
|
|
275
|
+ # scope_key = rfile_obj.get("scope")
|
259
|
276
|
p(scope_key,rfile_obj)
|
260
|
277
|
f.close()
|
|
278
|
+ scope_obj = self.get_scope(file_name,rfile_obj)
|
|
279
|
+ if self.scope_opt
|
261
|
280
|
exec(ftxt)
|
262
|
281
|
|
263
|
282
|
except Exception as e:
|