You are viewing an older version (9.10.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.10.0 / IPython / core / interactiveshell / InteractiveShell / mktempfile

function

IPython.core.interactiveshell:InteractiveShell.mktempfile

source: /IPython/core/interactiveshell.py :3890

Signature

def   mktempfile ( self data = None prefix = ipython_edit_ )

Summary

Make a new tempfile and return its filename.

Extended Summary

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.

Aliases

  • IPython.InteractiveShell.mktempfile