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")