Re: Environment vars

2020-11-27 Thread Bob van der Poel
On Fri, Nov 27, 2020 at 1:41 PM dn via Python-list wrote: > On 26/11/2020 05:46, Bob van der Poel wrote: > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. I've done a bit of a search and > > see both a comma and semicolo

Re: Environment vars

2020-11-27 Thread dn via Python-list
On 26/11/2020 05:46, Bob van der Poel wrote: I've got a program which accepts an optional env variable listing a single or multiple directory for the app to use. I've done a bit of a search and see both a comma and semicolon being used/suggested as a path separator. Any consensus on which is bett

Re: Environment vars

2020-11-25 Thread Greg Ewing
On 26/11/20 10:30 am, Bob van der Poel wrote: Yes, but os.path.split() turns a single path into its components. We're chatting about a bunch of complete path names separated by os.pathsep. Yeah, it's unfortunate that the word "path" is conventionally used for two very different things... -- Gr

Re: Environment vars

2020-11-25 Thread Eryk Sun
On 11/25/20, Bob van der Poel wrote: > > Ahha! Didn't know about os.pathsep. Seems simple enough to use that and be > done with it. > > I'm just using str.split() just now. Is there a os.splitpath()? I don't see > anything in the docs. There are no platform standard rules to follow when splitting

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 2:22 PM dn via Python-list wrote: > > Ahha! Didn't know about os.pathsep. Seems simple enough to use that and > be > > done with it. > > > > I'm just using str.split() just now. Is there a os.splitpath()? I don't > see > > anything in the docs. > > > https://docs.python.or

Re: Environment vars

2020-11-25 Thread dn via Python-list
Ahha! Didn't know about os.pathsep. Seems simple enough to use that and be done with it. I'm just using str.split() just now. Is there a os.splitpath()? I don't see anything in the docs. https://docs.python.org/3/library/os.path.html#os.path.split -- Regards =dn -- https://mail.python.org/mail

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 12:43 PM Eryk Sun wrote: > On 11/25/20, Bob van der Poel wrote: > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. > > In Unix one would use colon as the preferred delimiter. In Windows, > it's a

Re: Environment vars

2020-11-25 Thread dn via Python-list
On 26/11/2020 08:43, Chris Angelico wrote: On Thu, Nov 26, 2020 at 6:19 AM dn via Python-list wrote: I've got a program which accepts an optional env variable listing a single or multiple directory for the app to use. I've done a bit of a search and see both a comma and semicolon being used/s

Re: Environment vars

2020-11-25 Thread Eryk Sun
On 11/25/20, Bob van der Poel wrote: > I've got a program which accepts an optional env variable listing a single > or multiple directory for the app to use. In Unix one would use colon as the preferred delimiter. In Windows, it's a semicolon because DOS paths use colon to designate drives. Pytho

Re: Environment vars

2020-11-25 Thread Chris Angelico
On Thu, Nov 26, 2020 at 6:19 AM dn via Python-list wrote: > > >> I've got a program which accepts an optional env variable listing a single > >> or multiple directory for the app to use. I've done a bit of a search and > >> see both a comma and semicolon being used/suggested as a path separator. >

Re: Environment vars

2020-11-25 Thread dn via Python-list
I've got a program which accepts an optional env variable listing a single or multiple directory for the app to use. I've done a bit of a search and see both a comma and semicolon being used/suggested as a path separator. Any consensus on which is better? ... The one thing I really would *not* r

Re: Environment vars

2020-11-25 Thread Grant Edwards
On 2020-11-25, Bob van der Poel wrote: > What does DWIN mean? It's DWIM: "do what I mean". It refers to software (like PHP) that instead of requiring unambiguous input, it silently (and often incorrectly) guesses what ambiguous input is supposed to mean using heuristics known to and understood b

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 11:00 AM dn via Python-list wrote: > On 26/11/2020 05:46, Bob van der Poel wrote: > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. I've done a bit of a search and > > see both a comma and semicol

Re: Environment vars

2020-11-25 Thread Bob van der Poel
On Wed, Nov 25, 2020 at 10:59 AM Chris Angelico wrote: > On Thu, Nov 26, 2020 at 4:36 AM Bob van der Poel wrote: > > > > I've got a program which accepts an optional env variable listing a > single > > or multiple directory for the app to use. I've done a bit of a search and > > see both a comma

Re: Environment vars

2020-11-25 Thread dn via Python-list
On 26/11/2020 05:46, Bob van der Poel wrote: I've got a program which accepts an optional env variable listing a single or multiple directory for the app to use. I've done a bit of a search and see both a comma and semicolon being used/suggested as a path separator. Any consensus on which is bett

Re: Environment vars

2020-11-25 Thread Chris Angelico
On Thu, Nov 26, 2020 at 4:36 AM Bob van der Poel wrote: > > I've got a program which accepts an optional env variable listing a single > or multiple directory for the app to use. I've done a bit of a search and > see both a comma and semicolon being used/suggested as a path separator. > Any consen

Environment vars

2020-11-25 Thread Bob van der Poel
I've got a program which accepts an optional env variable listing a single or multiple directory for the app to use. I've done a bit of a search and see both a comma and semicolon being used/suggested as a path separator. Any consensus on which is better? MYPATHS=foo,bar,woof or MYPATHS=foo