This commit is contained in:
yumoqing 2024-10-10 10:18:36 +08:00
parent 9f001cbf9b
commit 82dacf619e
2 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import codecs
from urllib.parse import quote
import json
import asyncio
from traceback import fromat_exc
import random
import time
@ -204,6 +205,7 @@ def initEnv():
g.quotedstr = quotedstr
g.save_file = save_file
g.realpath = realpath
g.format_exc = format_exc
def set_builtins():
all_builtins = [ i for i in dir(builtins) if not i.startswith('_')]

View File

@ -118,6 +118,9 @@ class WsData:
def del_node(self, node):
self.nodes = {k:v for k,v in self.nodes.items() if k!=node.id}
def get_nodes(self):
return self.nodes
def get_node(self, id):
return self.nodes.get(id)