Python script write permissions

python

#1

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.


#2

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


#3

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