Python development _ tempfile

Source: Internet
Author: User

In pythonModule is provided for creating temporary files (folders)

If your application requires a temporary file to store data, but you do not need to share it with other programsModule to create temporary files (folders) is a good choice

Other applications cannot find this file (folder), because tempfile does not reference the file system table during creation, use the temporary file (folder) created by tempfile to close it.

And is automatically deleted.

Below is my demo:

File_name = % temp = open (file_name, (temp. write (B (* 50 (temp = (temp. write (B (* 50 (temp. close () (* 50 = main ()

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.