title: How do you create in python a file with permissions other users can write
body: <p>How can I in python (3) create a file what others users can write as well.
  I've so far this but it changes the </p>
  
  <pre><code>os.chmod("/home/pi/test/relaxbank1.txt", 777)
  with open("/home/pi/test/relaxbank1.txt", "w") as fh:
      fh.write(p1)  
  </code></pre>
  
  <p>what I get </p>
  
  <blockquote>
    <p>---sr-S--t  1 root root    12 Apr 20 13:21 relaxbank1.txt</p>
  </blockquote>
  
  <p>expected (after doing in commandline $ sudo chmod 777 relaxbank1.txt
  )</p>
  
  <blockquote>
    <p>-rwxrwxrwx  1 root root    12 Apr 20 13:21 relaxbank1.txt</p>
  </blockquote>