def open_using_pefile(self, input_name, input_bytes):
        try:
            pe = pefile.PE(data=input_bytes, fast_load=False)
        except Exception, error:
            print 'warning: pe_fail (with exception from pefile module) on file: %s' % input_name
            error_str =  '(Exception):, %s' % (str(error))
            return None, error_str

        # Now test to see if the features are there/extractable if not return FAIL flag
        if (pe.PE_TYPE is None or pe.OPTIONAL_HEADER is None or len(pe.OPTIONAL_HEADER.DATA_DIRECTORY) < 7):
            print 'warning: pe_fail on file: %s' % input_name
            error_str = 'warning: pe_fail on file: %s' % input_name
            return None, error_str

        # Success
        return pe, None

    # Extract various set of features using PEfile module
Check for stringy-ness in python 2.7 or 3
dataset/ETHPy150Open ClickSecurity/data_hacking/pefile_classification/pe_features.py/PEFileFeatures.open_using_pefile--crossover with--dataset/ETHPy150Open gallantlab/pycortex/cortex/xfm.py/isstr