File names with slashes [was Re: error in os.chdir]

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Jul 1 04:51:10 EDT 2018


On Sun, 01 Jul 2018 03:18:23 +0000, eryk sun wrote:

> Bear in mind that forward slash is just a  name character in NT.


So, using Python, how could you open, write to, and then read from, a 
file with a slash in its name? Say, something like:

    spam/eggs

in your home directory. (Is that still C:\\My Documents by default?)

And how would that file be displayed in the Windows GUI file explorer?



-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson




More information about the Python-list mailing list