파이썬 모듈을 import module
또는 from module import *
으로 가져 왔는지 감지 할 수 있습니까? 예 :Python 가져 오기 유형 감지
if __something__=='something':
print 'Directly imported with "import ' + __name__ + '"'
else:
print 'Imported with "from ' + __name__ + ' import *"'
감사합니다.
이 소리에 의존해야하는 것은 매우 파손되었습니다. –
난 그냥 궁금해서 =) – Emilio