Open
Description
On Windows I get an error. This is because tmp = tempfile.NamedTemporaryFile(suffix=suffix)
(line 84) opens and locks the file.
This can be fixed by calling tmp.close()
directly afterwards but I don't know if this breaks anything on other OSes.
>>> editor.edit(contents="hello")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Max\AppData\Local\pypoetry\Cache\virtualenvs\bulletin-3-N3PFQvT7-py3.10\lib\site-packages\editor.py", line 92, in edit
with open(filename, mode='wb') as f:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Max\\AppData\\Local\\Temp\\tmp55cimtei'
Metadata
Metadata
Assignees
Labels
No labels