tempfile.mkstemp() returns:
a tuple containing an OS-level handle to an open file (as would be returned by os.open()) and the absolute pathname of that fi
What's your goal, here? Is tempfile.TemporaryFile inappropriate for your purposes?
tempfile.TemporaryFile