def mkswap(self, filename, subdir='', suffix='swp', basedir=None):
    RANDOM_BITS = 64

    base = self.join(basedir or self._temp_dir, subdir)
    if not self.isdir(base):
      self.mkdir(base)

    candidate = self.join(base, "%s.%s" % (filename, suffix))
    return candidate
Returns current prompt inside IPython instance
dataset/ETHPy150Open cloudera/hue/desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py/Hdfs.mkswap--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/deathrow/gui/wx/ipshell_nonblocking.py/NonBlockingIPShell.get_prompt