Re: [Python-Dev] Drive suffix

2010-08-04 Thread Ulrich Eckhardt
On Wednesday 04 August 2010, Rob Cliffe wrote: > As it happens, what sparked the question was trying to determine in a > platform-independent way whether a path consisted of a bare drive > specification (e.g. "C:"). I guess > os.path.splitdrive(MyPath)[1] == "" > takes care of that. "platform

Re: [Python-Dev] Drive suffix

2010-08-04 Thread Cesare Di Mauro
2010/8/5 Greg Ewing > James Mills wrote: > >> Windows >> is one of the only Operating Systems with a File system that reuiqres >> this [A-Z]:\ syntax. >> > > There's also VMS, but it uses a colon too. Also its > pathnames are funky enough in other ways that it > needs its own os-specific pathname

Re: [Python-Dev] Drive suffix

2010-08-04 Thread Ben Finney
"Stephen J. Turnbull" writes: > It's a shame that Windows machines can be networked +1 QOTW Even if QOTW doesn't work in this forum, I still cast my vote. -- \ “We should strive to do things in [Gandhi's] spirit… not to use | `\ violence in fighting for our cause, but by non-particip

Re: [Python-Dev] Drive suffix

2010-08-04 Thread Stephen J. Turnbull
Greg Ewing writes: > I'm not aware of any system that's "just like Windows" > except that it uses something other than colons. It's a shame that Windows machines can be networked; otherwise we could formally treat drive letters as the scheme component of file URLs.

Re: [Python-Dev] Drive suffix

2010-08-04 Thread Greg Ewing
James Mills wrote: Windows is one of the only Operating Systems with a File system that reuiqres this [A-Z]:\ syntax. There's also VMS, but it uses a colon too. Also its pathnames are funky enough in other ways that it needs its own os-specific pathname routines. I'm not aware of any system th

Re: [Python-Dev] Drive suffix

2010-08-04 Thread Rob Cliffe
ffe - Original Message - From: "Guido van Rossum" To: "Rob Cliffe" Cc: "Python-Dev" Sent: Wednesday, August 04, 2010 4:10 PM Subject: Re: [Python-Dev] Drive suffix It's Windows specific syntax and always a colon. Use os.path.splitdrive() to parse it. I

Re: [Python-Dev] Drive suffix

2010-08-04 Thread James Mills
On Thu, Aug 5, 2010 at 1:10 AM, Guido van Rossum wrote: > It's Windows specific syntax and always a colon. Use > os.path.splitdrive() to parse it. I don't think there's a need to add > a named constant for it (you're the first to ask, in my memory). HI Guido, I'm not a windows user or developer,

Re: [Python-Dev] Drive suffix

2010-08-04 Thread Guido van Rossum
It's Windows specific syntax and always a colon. Use os.path.splitdrive() to parse it. I don't think there's a need to add a named constant for it (you're the first to ask, in my memory). On Wed, Aug 4, 2010 at 7:45 AM, Rob Cliffe wrote: > Is there a way of determining the suffix used after a dri

[Python-Dev] Drive suffix

2010-08-04 Thread Rob Cliffe
Is there a way of determining the suffix used after a drive letter to denote a drive, e.g. on Windows the ":" in r"C:\Dir\Subdir\File.Ext" ? Or is the colon so universal that it is considered unnecessary? Should it be in the os module somewhere (as far as I can tell, it isn't, although every o