Forum Archive

Can’t use open Or install Pythonista Tools

shanester

Hi,
I was trying to use the online installer for Pythonista Tools but I’m getting an error.

import requests as r; o=open('ptinstaller.py','w'); o.write(r.get('http://j.mp/pt-i').text); o.close()
Traceback (most recent call last):
File "", line 1, in
PermissionError: [Errno 1] Operation not permitted: 'ptinstaller.py'

I tried to sort it out and I’m getting the same type of error in all file open actions.

Any help?

Shane

cvp

@shanester use wb and content

import requests as r; 
o=open('ptinstaller.py','wb')
o.write(r.get('http://j.mp/pt-i').content)
o.close()