Python Forum
coming up with a sentinel string for file names
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
coming up with a sentinel string for file names
#1
i am designing a few commands which need to have 2 lists of file or directory names. what i need to come up with is some string that is reasonable to use as a sentinel to indicate where the 1st list ends on the command line and the 2nd list ends. the sentinel marker is not part of either list. this string needs to be something easy to enter on an interactive shell, possible to code in all scripting languages that can run commands, and unlikely to be a used file system object name. one possible marker is "--" that many unix commands already use to end options. but i was thinking of using ",". are there any better ideas?
Reply
#2
A common character to use for purposes such as this is '|'
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python coming to DroidScript (build native Android Apps) d_a_v_e 5 1,598 Feb-20-2024, 05:48 PM
Last Post: d_a_v_e
  is there an implied encodin in file names being opened? Skaperen 10 2,785 Mar-15-2022, 10:21 PM
Last Post: Skaperen
  coming up with a sentinel string for file names Skaperen 4 2,567 Jan-05-2019, 06:28 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