Answers for "print something from hidden file python"

2

how to make a hidden file in python

import os
# making a file called myFile.txt
open('myFile.txt', 'w')

# giving the file an attribute for hidden
os.system("attrib +h myFile.txt")
Posted by: Guest on October-04-2021
0

python file hidden

# os module
import os

# you can use the current directory you are in
fileName = "myFile.txt"

# or a different one with a path
fileName = "C:/Windows/myFile.txt"

# send in cmd
os.system("attrib +h " + fileName)
# +h for hidden
# -h for unhidden
Posted by: Guest on July-27-2021

Code answers related to "print something from hidden file python"

Python Answers by Framework

Browse Popular Code Answers by Language