mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-07-07 06:52:11 +08:00
feat: 便携版EXE
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
|
||||
import platform
|
||||
import binascii
|
||||
import builtins
|
||||
import base64
|
||||
import zlib
|
||||
import re
|
||||
@ -51,6 +52,9 @@ def require(module):
|
||||
index += 1
|
||||
return _module
|
||||
|
||||
def add_to_global_namespace(key, data):
|
||||
setattr(builtins, key, data)
|
||||
|
||||
def sanitize_filename(filename):
|
||||
if platform.system() == 'Windows' or platform.system() == 'Cygwin':
|
||||
# Windows不合法文件名字符
|
||||
@ -129,3 +133,4 @@ class jsobject(dict):
|
||||
def __getattr__(self, UNUSED):
|
||||
return None
|
||||
|
||||
add_to_global_namespace('require', require)
|
Reference in New Issue
Block a user