title: Python 3 no write attribute?
body: <p>I have an Error and below is part of the code:
  The rest code is at <a href="https://github.com/Flajt/Python-Webcam/blob/Flajt-ui-1/ui.py" rel="nofollow noreferrer">https://github.com/Flajt/Python-Webcam/blob/Flajt-ui-1/ui.py</a></p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Flajt\Documents\GitHub\Python-Webcam\ui.py", line 66, in &lt;module&gt;
      create()
    File "C:\Users\Flajt\Documents\GitHub\Python-Webcam\ui.py", line 31, in create
      save2=pickle.dump(password, hash)
  TypeError: file must have a 'write' attribute`
  </code></pre>
  
  <p>Code: </p>
  
  <pre><code>if Pass_ok:
      hash = pbkdf2_sha256.encrypt(password2, rounds=200000, salt_size=16)
      password=open("pass.pkl","wb")
      save2=pickle.dump(password, hash)
      main()
  </code></pre>