[Tutor] Files and file attributes

Remco Gerlich scarblac@pino.selwerd.nl
Thu, 22 Feb 2001 21:10:55 +0100


On Thu, Feb 22, 2001 at 02:48:48PM +0000, Ibraheem Umaru-Mohammed wrote:
> > On Thu, Feb 22, 2001 at 10:42:38AM +0100, Remco Gerlich wrote:
> > | On Wed, Feb 21, 2001 at 07:46:14PM -0500, D-Man wrote:
> > | I repeat my favorite solution, as I see everybody else omits it :)
> > | 
> > | f = open("c:/tmp/testfile","r+")
> > | 
> > | Windows is perfectly ok with forward slashes. They keep it a bit of a secret
> > | though...
> 
> is this a "Windows" feature or a Python induced platform specific translation?
> I thought forward slashes were used for something like environmental
> variables or something. ???

This is a Windows feature. Actually, DOS system calls also supported it both
forms, at least that's what I've heard.

Some DOS commands accept command line options with a /, like dir /p, but
that has nothing to do with this.

(I've know all this only from posts to comp.lang.python and the like, I
don't use Windows myself, but try it out, it'll work...)
-- 
Remco Gerlich