I have this code here that creates a file f = open("data.txt", "w+")
but I also want it to be hidden so I was thinking maybe something like this f = open("data.txt", "wh+")
.
Asked
Active
Viewed 69 times
0

jpf911
- 117
- 2
- 9
-
1Does this answer your question? [How can I make a file hidden on Windows?](https://stackoverflow.com/questions/43441883/how-can-i-make-a-file-hidden-on-windows) – Mandera Dec 10 '20 at 06:39
1 Answers
0
According to docs these are the available modes
'r':open for reading (default)
'w':open for writing, truncating the file first
'x':open for exclusive creation, failing if the file already exists
'a':open for writing, appending to the end of the file if it exists
'b':binary mode
't':text mode (default)
'+':open for updating (reading and writing)

Diego Torres Milano
- 65,697
- 9
- 111
- 134