Python Forum
i'm back to f-strings, again
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i'm back to f-strings, again
#1
i have a list of file name patterns. where each parameter is expected in the file name varies between names. but, this list has it all. the list was read in from a configuration file. it is stored in global space so all the functions that need it can access it. these names are in f-string format in the configuration file. there are 4, 6, or 8 names. there are 2 or 3 parameters which varies by which file it is.

next, i need to make functions that take arguments for each parameter, such which directory/folder they are in for each call or which file extension it has or the file's creator (a name that varies in location in the file name through the list). one of these functions will check that each file in the given directory/folder does exist.

the parameters will be passed as arguments. but these probably should be keyword arguments so the functions can get them as a directory.

so, how would the f-strings be read in from the configuration file?

how would a function, such as the one that tests existence, get the format parameters filled in?
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
i'm back to f-strings, again - by Skaperen - Sep-20-2022, 06:10 PM
RE: i'm back to f-strings, again - by rob101 - Sep-20-2022, 09:16 PM
RE: i'm back to f-strings, again - by Skaperen - Sep-21-2022, 01:47 AM
RE: i'm back to f-strings, again - by bowlofred - Sep-21-2022, 03:10 AM
RE: i'm back to f-strings, again - by Gribouillis - Sep-21-2022, 08:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to understand strings and lists of strings Konstantin23 2 1,910 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  Splitting strings in list of strings jesse68 3 2,721 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  Back again on f-strings newbieAuggie2019 11 7,073 Oct-16-2019, 11:24 PM
Last Post: newbieAuggie2019
  Finding multiple strings between the two same strings Slither 1 3,367 Jun-05-2019, 09:02 PM
Last Post: Yoriz
  lists, strings, and byte strings Skaperen 2 5,128 Mar-02-2018, 02:12 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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