osx - setting hidden status in Mac with Python -


to toggle hidden status of file on mac osx in python, use following code:

st = os.stat(file_path) os.chflags(file_path, st.st_flags ^ stat.uf_hidden) 

this works "files" not work "folders". note not talking files or folders start "."


edit: above code works both files , folder, made mistake in assumption...


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -