from os.path import dirname with open(dirname(__file__) + '/kernel.cu') as f: kernel = f.read() with open(dirname(__file__) + '/daq.cu') as f: daq = f.read()