>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 (occasionally) doing the translation as /F
mentions:
C:\temppython
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright" , "credits" or "license" for more
information.
>>for line in file('subdir/test.txt'):
.... print line.strip()
....
1
2
3
>>^Z
C:\tempREM try the same filename convention from dos prompt
C:\temptype subdir/test.txt
The syntax of the command is incorrect.
C:\tempREM try with quotes, just in case...
C:\temptype "subdir/test.txt"
The syntax of the command is incorrect.
C:\tempnotepad subdir/test.txt
C:\tempREM correctly opened the text file in notepad
Windows seems to doing the translation inconsistently (I know
that comes as a shock...)
-tkc