Re: [OT] Win32 and forward/backslashes (was "The format of filename")

2006-10-26 Thread Neil Cerutti
On 2006-10-26, Tim Chase <[EMAIL PROTECTED]> wrote: > There's no "zip" in the "baz" directory, so let's copy it > there: > > C:\temp>copy foo/bar/zip foo/baz > foo\zip > Overwrite foo\zip? (Yes/No/All): y > The file cannot be copied onto itself. > 0 file(s) copied. > > What the [expletive]

Re: [OT] Win32 and forward/backslashes (was "The format of filename")

2006-10-26 Thread Tim Chase
Tim Roberts wrote: >> C:\temp\foo\bar>cd .. >> C:\temp\foo>cd .. >> C:\temp>cd /foo/bar > > This one does not work for me, but as long as the initial slash is back, > the rest can be foreward: > > C:\tmp>cd /foo/bar > The system cannot find the path specified. > C:\tmp>cd \foo/bar >

Re: The format of filename

2006-10-26 Thread Tim Chase
>> Some experimentation shows that Python does seem to provide >> *some* translation. Windows lets me use '/' as a path separator, >> but not as the name of the root of a partition name. But perhaps >> this a peculiarity of the commands themselves, and not of Windows >> path names in particular. >>

Re: The format of filename

2006-10-26 Thread Neil Cerutti
On 2006-10-26, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: >> Seriously, experiments show the forward slash is OK as a >> seperator, it just can't be root. > > do you think you can figure out why, even without reading the > various MSDN pages you've been pointed to ? Too late. P

Re: The format of filename

2006-10-26 Thread Fredrik Lundh
Neil Cerutti wrote: > Seriously, experiments show the forward slash is OK as a > seperator, it just can't be root. do you think you can figure out why, even without reading the various MSDN pages you've been pointed to ? -- http://mail.python.org/mailman/listinfo/python-list

Re: The format of filename

2006-10-26 Thread Neil Cerutti
On 2006-10-26, Tim Roberts <[EMAIL PROTECTED]> wrote: > Neil Cerutti <[EMAIL PROTECTED]> wrote: >> >>Some experimentation shows that Python does seem to provide >>*some* translation. Windows lets me use '/' as a path separator, >>but not as the name of the root of a partition name. But perhaps >>th

Re: The format of filename

2006-10-25 Thread Tim Roberts
Neil Cerutti <[EMAIL PROTECTED]> wrote: > >Some experimentation shows that Python does seem to provide >*some* translation. Windows lets me use '/' as a path separator, >but not as the name of the root of a partition name. But perhaps >this a peculiarity of the commands themselves, and not of Windo

Re: The format of filename

2006-10-24 Thread [EMAIL PROTECTED]
Tim Chase wrote: > > C:\temp> REM try the same filename convention from dos prompt > C:\temp> type subdir/test.txt > The syntax of the command is incorrect. > C:\temp> REM try with quotes, just in case... > C:\temp> type "subdir/test.txt" > The syntax of the command is incorrect. > C:\temp> notep

Re: The format of filename

2006-10-24 Thread Steve Holden
Tim Chase wrote: >>>As an example, I'm aware (through osmosis?) that I can use '/' as >>>a directory separator in filenames on both Unix and Dos. But >>>where is this documented? >> >>in the documentation for your operating system. Python doesn't do >>anything with the filenames. > > > Windows

Re: The format of filename

2006-10-24 Thread Fredrik Lundh
Tim Chase wrote: > Windows seems to be (occasionally) doing the translation as /F > mentions: as leif pointed out, there's no translation. > C:\temp> REM try the same filename convention from dos prompt > C:\temp> type subdir/test.txt > The syntax of the command is incorrect. > C:\temp> REM try

Re: The format of filename

2006-10-24 Thread Neil Cerutti
On 2006-10-24, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2006-10-24, Neil Cerutti <[EMAIL PROTECTED]> wrote: >> Is translation of '/' to '\\' a feature of Windows or Python? > > Well, *that* was easy to discover on my own. ;-) > > Thanks for the pointers. Some experimentation shows that Python

Re: The format of filename

2006-10-24 Thread Tim Chase
>> As an example, I'm aware (through osmosis?) that I can use '/' as >> a directory separator in filenames on both Unix and Dos. But >> where is this documented? > > in the documentation for your operating system. Python doesn't do > anything with the filenames. Windows seems to be (occasionall

Re: The format of filename

2006-10-24 Thread Fredrik Lundh
Neil Cerutti wrote: > Is translation of '/' to '\\' a feature of Windows or Python? Windows. Random MSDN link: http://msdn2.microsoft.com/en-us/library/77859s1t.aspx Win32 operating systems support both the backslash (\) and the forward slash (/). /.../ (However, the Windows ope

Re: The format of filename

2006-10-24 Thread Neil Cerutti
On 2006-10-24, Neil Cerutti <[EMAIL PROTECTED]> wrote: > Is translation of '/' to '\\' a feature of Windows or Python? Well, *that* was easy to discover on my own. ;-) Thanks for the pointers. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: The format of filename

2006-10-24 Thread Leif K-Brooks
Neil Cerutti wrote: > Is translation of '/' to '\\' a feature of Windows or Python? It's a feature of Windows, but it isn't a translation. Both slashes are valid path separators on Windows; backslashes are just the canonical form. -- http://mail.python.org/mailman/listinfo/python-list

Re: The format of filename

2006-10-24 Thread Neil Cerutti
On 2006-10-24, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: > >> Where can I find documentation of what Python accepts as the >> filename argument to the builtin function file? >> >> As an example, I'm aware (through osmosis?) that I can use '/' as >> a directory separator in fil

Re: The format of filename

2006-10-24 Thread Neil Cerutti
On 2006-10-24, Leif K-Brooks <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: >> As an example, I'm aware (through osmosis?) that I can use '/' >> as a directory separator in filenames on both Unix and Dos. >> But where is this documented? > > It's documented in the OS's documentation. It can be qu

Re: The format of filename

2006-10-24 Thread Fredrik Lundh
Neil Cerutti wrote: > Where can I find documentation of what Python accepts as the > filename argument to the builtin function file? > > As an example, I'm aware (through osmosis?) that I can use '/' as > a directory separator in filenames on both Unix and Dos. But > where is this documented? in

Re: The format of filename

2006-10-24 Thread Leif K-Brooks
Neil Cerutti wrote: > Where can I find documentation of what Python accepts as the > filename argument to the builtin function file? Python will accept whatever the OS accepts. > As an example, I'm aware (through osmosis?) that I can use '/' as > a directory separator in filenames on both Unix an

The format of filename

2006-10-24 Thread Neil Cerutti
Where can I find documentation of what Python accepts as the filename argument to the builtin function file? As an example, I'm aware (through osmosis?) that I can use '/' as a directory separator in filenames on both Unix and Dos. But where is this documented? -- Neil Cerutti -- http://mail.py