TenjintShell.mktempfile

TenjintShell.mktempfile(data=None, prefix='ipython_edit_')

Make a new tempfile and return its filename.

This makes a call to tempfile.mkstemp (created in a tempfile.mkdtemp), but it registers the created filename internally so ipython cleans it up at exit time.

Optional inputs:

  • data(None): if data is given, it gets written out to the temp file immediately, and the file is closed again.