Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python tempfile

import os
import tempfile

fd, path = tempfile.mkstemp()
try:
    with os.fdopen(fd, 'w') as tmp:
        # do stuff with temp file
        tmp.write('stuff')
finally:
    os.remove(path)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #tempfile
ADD COMMENT
Topic
Name
7+1 =