Windows not compatible with .NamedTemporaryFile() without (delete=False) passed in.

...File

Windows will close the file before it can be re-opened due to the use of O_TEMPORARY in the file creation flags. Therefore sublime throws error. Adding delete=False fixes but will not automatically clean up the temp files so user will need to manually delete temp files with this fix. Not ideal.