'Hook called on a filename to be sourced.'

def sourcehook(self, newfile):

    if (newfile[0] == '"'):
        newfile = newfile[1:(-1)]
    if (isinstance(self.infile, basestring) and (not os.path.isabs(newfile))):
        newfile = os.path.join(os.path.dirname(self.infile), newfile)
    return (newfile, open(newfile, 'r'))
