feat: Fix importlib error

master
Qwreey 2023-02-05 19:58:01 +09:00
parent 91be974dbc
commit 697f7ace59
1 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,11 @@ import zipfile
import os import os
import importlib import importlib
basePath = os.path.realpath(os.path.dirname(__file__)+"/../") basePath = os.path.realpath(os.path.dirname(__file__)+"/../")
wgetHandler = importlib.util.module_from_spec(importlib.util.spec_from_file_location("wgetHandler",basePath+"/wgetHandler.py")) wgetHandlerSpec = importlib.util.spec_from_file_location("wgetHandler",basePath+"/wgetHandler.py")
wgetHandler = importlib.util.module_from_spec(wgetHandlerSpec)
wgetHandlerSpec.loader.exec_module(wgetHandler)
# import wgetHandler # import wgetHandler
print("__file__ : {__file__}".format(__file__=__file__)) print("__file__ : {__file__}".format(__file__=__file__))