Python script write permissions



Are scripts allowed to write to the filesystem? I gave write permission to my script via chmod and even used sudo, but it still fails to write.


What is exact Python code you used to open a file and write to that file.


Nevermind, my script just had the wrong path for writing (…/foo/ -> foo/).