猫型エンジニアのブログ

プログラム/ネットワーク系の技術関連をまとめたページです 

import済みモジュールの確認

class test_class:
	def _init_(sele, value):
		self.value = value
>>> import sys
>>> import test_modules
>>> sys.modules['test_modules']
<module 'test_modules' from 'test_modules.py'>
>>> test_modules
<module 'test_modules' from 'test_modules.py'>
>>> sys.modules
{'copy_reg': <module 'copy_reg' from '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy_reg.pyc'>,}