[공부용]참고 사이트 모음/[python]
[python] 동적 import 하기
bled
2021. 6. 2. 11:18
https://bluese05.tistory.com/31
Python class 명을 변수로 받아 동적 import 하기
Class 명을 변수로 받아 동적으로 import (Python Dynamic import) python 의 모듈을 import 할때는 보통 파일 초기에 선언하여 사용하는게 일반적이다. 그런데, 모듈을 처음부터 import 하지 않고 로직에..
bluese05.tistory.com
https://stackoverflow.com/questions/301134/how-to-import-a-module-given-its-name-as-string
How to import a module given its name as string?
I'm writing a Python application that takes as a command as an argument, for example: $ python myapp.py command1 I want the application to be extensible, that is, to be able to add new modules that
stackoverflow.com
https://blog.naver.com/city7310/221128089625
[Python] 동적 import
파이썬의 모듈을 import할 때는 보통 모듈의 상단에 선언하여 사용하는 게 일반적입니다. 하지만 import를 ...
blog.naver.com
import importlib
def load_module(module_name):
return importlib.import_module(module_name)
def load_module(module_name):
return __import__(module_name)