Python Forum
coming up with a sentinel string for file names - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: coming up with a sentinel string for file names (/thread-17489.html)



coming up with a sentinel string for file names - lacaca - Apr-13-2019

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?


RE: coming up with a sentinel string for file names - Larz60+ - Apr-13-2019

A common character to use for purposes such as this is '|'