def safe_mkstemp(suffix, prefix='<STR_LIT>'):
tmpfd, tmppath = tempfile.mkstemp(<EOL>suffix=suffix,<EOL>prefix=prefix,<EOL>dir=current_app.config['<STR_LIT>']<EOL>)<EOL>os.close(tmpfd)<EOL>if '<STR_LIT:.>' not in suffix:<EOL><INDENT>return tmppath<EOL><DEDENT>while '<STR_LIT:.>' in os.path.basename(tmppath)[:-len(suffix)]:<EOL><INDENT>os.remove(tmppath)<EOL>tmpfd, tmppath = tempfile.mkstemp(<EOL>suffix=suffix,<EOL>prefix=prefix,<EOL>dir=current_app.config['<STR_LIT>']<EOL>)<EOL>os.close(tmpfd)<EOL><DEDENT>return tmppath<EOL>
Create a temporary filename that don't have any '.' inside a part
    from the suffix.