Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python make temp file

import tempfile
 
with tempfile.TemporaryFile() as tempf:
    tempf.write(b"Hello World!") # write to the tempf
    tempf.seek(0) # go to the first char of tempf
    print(tempf.read()) # prints b'Hello World!'
 
PREVIOUS NEXT
Tagged: #python #temp #file
ADD COMMENT
Topic
Name
7+4 =