Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
temporary file names
#1
Python does have functions to create temporary files that can be used for temporary storage. but what i am looking for it a function to create a file that will have a temporary name and is destined to be renamed or relinked to become a file named with the given name. the caller will do the rename if it is appropriate or will remove the file. a use case would be when the caller is making a change to the contents of the file and must have no point in time when the file could be lost.

my intent is to encapsulate this as a class so that details of relinking, and finding an appropriate name that can be renamed are not dealt with by the caller. instead the caller would finish up by calling a .finish() method with a boolean to indicate if the new file is to be kept.

but i don't want to code this if it is in Python, already.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
temporary file names - by Skaperen - Dec-31-2018, 07:09 PM
RE: temporary file names - by Gribouillis - Dec-31-2018, 11:02 PM
RE: temporary file names - by Skaperen - Dec-31-2018, 11:57 PM
RE: temporary file names - by Gribouillis - Jan-01-2019, 10:00 AM
RE: temporary file names - by Skaperen - Jan-01-2019, 08:44 PM
RE: temporary file names - by Gribouillis - Jan-02-2019, 09:14 AM
RE: temporary file names - by Skaperen - Jan-02-2019, 07:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  rename same file names in different directories elnk 0 734 Nov-04-2022, 05:23 PM
Last Post: elnk
  Saving Excel workbook file with dataframe names Biplab1985 0 2,052 Jun-07-2020, 12:25 PM
Last Post: Biplab1985
  Details of attachment files in a msg file such as file names save into a python list klllmmm 2 5,762 Nov-12-2019, 05:59 AM
Last Post: klllmmm
  splitstring file names a by hyphen steve22020 3 3,318 Oct-30-2019, 05:39 PM
Last Post: steve22020
  Is there a more effecient way to do this ? File Names sumncguy 2 2,108 Jul-11-2019, 12:47 PM
Last Post: DeaD_EyE
  How to combine file names into a list from multiple directories? python_newbie09 3 5,250 Jul-09-2019, 07:38 PM
Last Post: python_newbie09
  write each line of a text file into separate text files and save with different names Shameendra 3 2,818 Feb-20-2019, 09:07 AM
Last Post: buran
  Reading file names CertifiedPengu 1 2,290 Jan-07-2019, 06:54 PM
Last Post: Gribouillis
  how to increment all file names in a folder SoulsKeeper 5 6,088 Sep-10-2018, 07:59 PM
Last Post: Skaperen
  dealing with spaces in file names AceScottie 5 75,513 Jun-02-2018, 01:06 PM
Last Post: AceScottie

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020