Let me preface this by saying I\'m not exactly sure what is happening with my code; I\'m fairly new to programming.
I\'ve been working on creating an i
Related to the title of the question, though not the specifics, if you really want your file names to include something that looks like a slash, you can use the unicode character "∕" (DIVISION SLASH), aka u'\u2215'
.
This isn't useful in most circumstances (and could be confusing), but can be useful when the standard nomenclature for a concept you wish to include in a filename includes slashes.
you cannot have /
in the file basename on unix or windows, you could replace /
with .
:
page.replace("/",".") + ".txt"
Python presumes /site
etc.. is a directory.
On Unix/Mac OS, for the middle slashes, you can use :
which will convert to /
when viewed, but trigger the subfolders that /
does.
site/sitename/class/final-code
-> final-code
file in a class
folder in a sitename
folder in a site
folder in the current folder
site:sitename:class:final-code
-> site/sitename/class/final-code
file in the current folder.