tempfile

tempfile(pattern='file', fileext='', mode='w+b', tmpdir=None)

Get the the path to a tempory file

Parameters

Name Type Description Default
pattern str The prefix of the file. Defaults to ‘file’. 'file'
fileext str The extension to give to the file. Defaults to ’’. ''
mode str The mode of the file. Defaults to ‘w+b’. 'w+b'
tmpdir Union[None, str] The folder where the file should be located in. Defaults to a new temporary directory. None

Returns

Name Type Description
str str with the path to the file

Examples

>>> from rlike import *
>>> x = tempfile()
>>> x = tempfile(pattern = 'hello', fileext = '.txt')