1# os module
2import os
3
4# you can use the current directory you are in
5fileName = "myFile.txt"
6
7# or a different one with a path
8fileName = "C:/Windows/myFile.txt"
9
10# send in cmd
11os.system("attrib +h " + fileName)
12# +h for hidden
13# -h for unhidden