code.compile API [rev. 38799]

def compile_(source, filename=None, mode='exec', flags=0, dont_inherit=0):

compile the given source to a raw code object, which points back to the source code through "co_filename.__source__". All code objects contained in the code object will recursively also have this special subclass-of-string filename.