class_docstr: Utility class to create temporary Python/IPython files.
  
  Meant as a mixin class for test cases.
class_docstr_tok: ["Utility","class","to","create","temporary","Python\/IPython","files",".","Meant","as","a","mixin","class","for","test","cases","."]
docstr: Make a valid python temp file.
code: def mktmp(self, src, ext=".py"):
      """Make a valid python temp file."""
      fname, f = temp_pyfile(src, ext)
      self.tmpfile = f
      self.fname = fname
  
imports: from __future__ import absolute_import
  import os
  import re
  import sys
  import tempfile
  from contextlib import contextmanager
  from io import StringIO
  from subprocess import Popen, PIPE
  from traitlets.config.loader import Config
  from IPython.utils.process import get_output_error_code
  from IPython.utils.text import list_strings
  from IPython.utils.io import temp_pyfile, Tee
  from IPython.utils import py3compat
  from IPython.utils.encoding import DEFAULT_ENCODING
  from .None import decorators
  from .None import skipdoctest
label_desc: Use image node_id 1 for calling the TempFileMixin obj's underlying member method code with example usage: obj.mktmp(src, ext) without return types