@conf
def check_python_module(conf, module_name):
	"""
	Check if the selected python interpreter can import the given python module.
	"""
	result = not Utils.pproc.Popen([conf.env['PYTHON'], "-c", "import %s" % module_name],
			   stderr=Utils.pproc.PIPE, stdout=Utils.pproc.PIPE).wait()
	conf.check_message('Python module', module_name, result)
	if not result:
		conf.fatal('Could not find the python module %r' % module_name)
dataset/ETHPy150Open appcelerator-archive/poc-nodejs-desktop/Resources/nodejs/builds/linux/node/lib/node/wafadmin/Tools/python.py/check_python_module/original